I am playing around with the event_search API from Eventbrite using the NPM package.
Unfortunately I don't quite understand how the paging works. did not find anything on the official doc or forums.
If I make a call like this
var params = {'keywords':query,'paging':2,'max':100}
eventbrite.event_search(params,function(err,data){
console.log(data);
);
I will receive as a result:
{ result:
{ events:
[ [Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object] ]
},
error: null
}
{ summary:
{ total_items: 170,
first_event: 6756066577,
last_event: 9079524101,
filters: { keywords: 'hackathon','page':10 },
num_showing: 10 }
}
I don't really see the logic of the way events are ordered, it's not by id, neither by starting date. I from that perspective I don't see how I could go through the rest of the results.
If you faced the same problem or if you have any hint. Thank you for your help ! :)
Great question -- I'm a Product Manager on the Eventbrite API, so I'd love to help you out.
On the /event_search API method, there is an argument that you can set for how you sort the results -- you can set "sort_by" to a couple different values (Date, ID, name, and city). I would recommend sorting by ID, because it's the most consistent.
Once you do an initial pull from our directory, you can pull a subset of the total events by filtering on the 'date_created' or 'date_modified' arguments... so that you're only receiving events that have recently been added or updated.
Here is the documentation for the current /event_search API: http://developer.eventbrite.com/doc/events/event_search/
Hope that helps!