Skip to content

Commit 53cfb3c

Browse files
Update the JS to deal with the new data structure of the response from Meetup's API v3 (#22)
1 parent afb5f91 commit 53cfb3c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

_includes/meetup_cards.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
var Meetup = function(meetupURL) {
2727
this.meetupURL = (typeof meetupURL!=='undefined') ? meetupURL :
28-
"https://api.meetup.com/2/events?offset=0&format=json&limited_events=False&group_urlname=techcorridorio&page=200&fields=&order=time&desc=false&status=upcoming&sig_id=168857872&sig=e659cc6038d27adf6eae600a44905c69196c77df";
28+
"http://api.meetup.com/Alexandria-Code-Coffee/events";
2929

3030
this.getEvents = function(callback) {
3131
$.ajax({
@@ -41,7 +41,6 @@
4141
}
4242
};
4343

44-
4544
window.onload = function(){
4645
$('*[data-component="meetup-card-collection"]').each(function(){
4746
var componentConfiguration = {
@@ -51,7 +50,7 @@
5150
};
5251

5352
var meetup = new Meetup(componentConfiguration.url).getEvents(function(data) {
54-
$.each(data.results, function(i, event) {
53+
$.each(data.data, function(i, event) {
5554
if (i < componentConfiguration.maxEvents) {
5655
eventPresenter = EventPresenter(event);
5756
createEventCard(eventPresenter);

0 commit comments

Comments
 (0)