-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathapi-test.html
106 lines (78 loc) · 3.11 KB
/
api-test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!doctype html>
<html lang="en">
<head>
<title>TEST API PAGE</title>
<script src="js/jquery-1.6.4.min.js"></script>
</head>
<body>
<h2>Google Plus Posts</h2>
<div id="googlePlusResults"></div>
<h1>eventRsvpResults</h1>
<div id="eventRsvpResults"></div>
<h1>Comments</h1>
<div id="commentResults"></div>
<h2>Events</h2>
<div id="eventResults"></div>
</body>
<script src="js/api/meetupApi.js"></script>
<script src="js/api/googlePlusApi.js"></script>
<script>
$(document).ready( function() {
meetupApi.getMeetupEventRsvps( "sgddqypcbbc", function(data) {
var html = [];
for(var i in data)
{
html.push("<article><dl>");
html.push("<dt>Name:</dt><dd>" + data[i].member_name + "</dd>");
html.push("<dt>Member ID:</dt><dd>" + data[i].member_id + "</dd>");
html.push("<dt>RSVP Id:</dt><dd>" + data[i].rsvp_id + "</dd>");
html.push("<dt>Comments:</dt><dd>" + data[i].comments + "</dd>");
html.push("<dt>Member Images:</dt><dd><img src = '" + data[i].member_photo_thumb_link + "'></dd>");
html.push("<dt>Member Url:</dt><dd>" + data[i].member_profile + "</dd>");
html.push("</dl></article>");
}
$("#eventRsvpResults").append(html.join(''));
});
meetupApi.getMeetupEvents(function(data) {
var html = [];
for(var i in data)
{
html.push("<article><dl>");
html.push("<dt>Name:</dt><dd>" + data[i].name + "</dd>");
html.push("<dt>Id:</dt><dd>" + data[i].id + "</dd>");
html.push("<dt>Date:</dt><dd>" + data[i].time + "</dd>");
html.push("<dt>Url:</dt><dd><a href=\"" + data[i].url + "\">" + data[i].url + "</a></dd>");
html.push("<dt>Description:</dt><dd>" + data[i].description + "</dd>");
html.push("</dl></article>");
}
$("#eventResults").append(html.join(''));
});
meetupApi.getMeetupComments(function(data) {
var html = [];
for(var i in data)
{
html.push("<article><dl>");
html.push("<dt>Name:</dt><dd>" + data[i].name + "</dd>");
html.push("<dt>From:</dt><dd>" + data[i].city + "</dd>");
html.push("<dt>Comment:</dt><dd>" + data[i].comment + "</dd>");
html.push("<dt>User Photo URL:</dt><dd>" + data[i].photo_url + "</dd>");
html.push("<dt>User Profile URL:</dt><dd>" + data[i].link + "</dd>");
html.push("</dl></article>");
}
$("#commentResults").append(html.join(''));
});
googlePlusApi.getLatestGooglePlusActivity(function(data) {
var html = [];
for(var i in data)
{
html.push("<article><dl>");
html.push("<dt>Google Plus Activity Name:</dt><dd>" + data[i].title + "</dd>");
html.push("<dt>Google Plus Activity Creation Date:</dt><dd>" + data[i].pub_date + "</dd>");
html.push("<dt>Google Plus Activity Url:</dt><dd><a href=\"" + data[i].url + "\">" + data[i].url + "</a></dd>");
html.push("</dl></article>");
}
$("#googlePlusResults").append(html.join(''));
});
});
</script>
</html>