Reputation: 781
Just want to bring back the latest event from our list. Using the JavaScript API, it seems to bring back all events, even those in draft or those completed.
Is there a parameter I can pass to restrict the results, or do I need to do filter it after I get the results?
There is a 'status' object which I could inspect. This is all I'm currently using
eb_client.user_list_events({}, function (response) {
console.log(response.events)
$.each(response.events, function () {
console.log(this.event.title)
});
});
Thanks!
Upvotes: 0
Views: 250
Reputation: 169
You can use the event_statuses
parameter to return live, started, or ended events. These options need to be in a comma separated list without spaces. If you leave this field blank, it will return everything. The “ended” option will only return events that have ended in the past 7 days.
For example:
event_statuses=live,started
Upvotes: 2