public RockEventbriteEvent(Group group, bool loadEventbriteEvent = false) { _rockContext = new RockContext(); LoadRockGroup(group); if (loadEventbriteEvent && Eventbrite.EBUsageCheck(group.Id)) { LoadEventbriteEvent(); } }
public RockEventbriteEvent(int GroupId, bool loadEventbriteEvent = false) { _rockContext = new RockContext(); LoadRockGroup(GroupId); if (loadEventbriteEvent && Eventbrite.EBUsageCheck(GroupId)) { LoadEventbriteEvent(); } }
/// <summary> /// Get the next page of events for the current search and appends it to EventsList /// </summary> /// <returns> Task which is getting the events page asynchronously </returns> public async Task GetNextEventsPage() { List <Event> nextEventsPage; try { nextEventsPage = await Eventbrite.GetNextEventsPage(); } catch (Eventbrite.NoMoreEventsPagesException) { return; } EventsList.AddRange(nextEventsPage); NotifyOfPropertyChange(() => EventsList); }
/// <summary> /// Clears EventsList and populates it with a new page of events for the given location / proximity /// </summary> /// <param name="location"> Location to search </param> /// <param name="proximity"> Proximity in miles to the given location to search </param> /// <returns> Task which is getting the events page asynchronously </returns> public async Task GetNewEventsPage(string location, int proximity = 25) { List <Event> eventsPage; try { eventsPage = await Eventbrite.GetNewEventsPage(location, proximity); } catch (System.Net.WebException) { MessageBox.Show("No results found for your search. Check your internet location and city name / zip code"); return; } EventsList.Clear(); EventsList.AddRange(eventsPage); NotifyOfPropertyChange(() => EventsList); }