2014-01-08 44 views
0

我正在使用此.NET API包裝器,http://penguinboy.github.com/Eventbrite.NET如何使用Eventbrite.net API封裝器僅獲取當前事件

嘗試示例代碼,已被轉換成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 

的organiser.event.values將返回我所有的過去和現在的事件。目前,我使用循環來查看事件列表,但如果組織者創建了大量事件,則http請求可能需要很長時間才能處理。

是否有任何方法可以提供僅獲取當前事件的能力?

回答

0

是的,您可以使用user_list_events API並通過event_statuses=live僅返回實時事件。

http://developer.eventbrite.com/doc/users/user_list_events/

我不知道這個.NET包裝究竟是如何實現的,但你需要找到調用user_list_events適當的方法,並通過在這兩個event_statuses=live[email protected]你感興趣的用戶。如果您試圖讓您的事件發生,您可以省略user參數,並且默認情況下會返回您的事件。

相關問題