Reputation: 1
I am using this .NET API Wrapper, http://penguinboy.github.com/Eventbrite.NET.
After trying the sample codes, which had been converted to VB.net:
' Create the context object with your API details
Dim context = New EventbriteContext("Replace with APP Key", "Replace with User Key")
' Instantiate Organizer entity with the desired organizer ID
Dim organizer = context.GetOrganizer(Replace with Organizer ID)
' Get all the events that the organizer has created
Dim events = organizer.Events.Values
' Get the first event in the collection
Dim firstEvent = events.First()
' All the attendees in that event
Dim attendees = firstEvent.Attendees
' All the tickets in that event
Dim tickets = firstEvent.Tickets.Value
The organiser.event.values will return me all the past and current events. Currently, I use a loop to go through the events list but if the organizer has a lot of events created then the http request may take a long of time to process.
Is there any methods that could provide the ability to get just the current events only?
Upvotes: 0
Views: 461
Reputation: 7428
Yes, you can use the user_list_events
API and pass in event_statuses=live
to return only live events.
http://developer.eventbrite.com/doc/users/user_list_events/
I don't know exactly how this .NET wrapper is implemented, but you'll need to find the appropriate method which calls user_list_events
and pass in both event_statuses=live
and [email protected]
for the user you are interested in. If you are trying to get your own events, you can leave out the user
argument and by default your events will be returned.
Upvotes: 0