private async void SetupSampleData() { var items = await SampleData.GetEventFeed(); foreach (var item in items) { FeatureEvents.Add(item); MyEvents.Add(item); AllEvents.Add(item); } }
public async Task GetFeatureEvents() { var feedResultEntity = await _eventManager.GetFeaturedEvents(Locator.ViewModels.MainPageVm.CurrentTokens, "recommendInGame", Locator.ViewModels.MainPageVm.CurrentUser.Region); var result = await ResultChecker.CheckSuccess(feedResultEntity); if (!result) { return; } var feedEntity = JsonConvert.DeserializeObject <EventsResponse>(feedResultEntity.ResultJson); foreach (var feed in feedEntity.Events) { FeatureEvents.Add(feed); } }