Exemplo n.º 1
0
        public async Task LoadConcertDetails(EventExt concert)
        {
            try
            {
                if (!concert.Venue.IsVenueDetailsLoaded && concert.Venue.Id.HasValue)
                {
                    var venue = await _dataService.GetVenueDetails(concert);
                    concert.Venue.IsVenueDetailsLoaded = true;
                    concert.Venue = venue;
                }

                foreach (var performance in concert.Performances)
                {
                    var artist = performance.Artist;
                    if (artist.UpcomingEvents == null)
                    {
                        var upcoming = await _dataService.GetArtistUpcomingEvents(performance.Artist);
                        artist.UpcomingEvents = upcoming;
                    }

                    if (artist.PastEvents == null)
                    {
                        var past = await _dataService.GetArtistPastEvents(performance.Artist);
                        artist.PastEvents = past;

                        GetArtistHistory(past);
                    }
                }
            }
            catch (Exception ex)
            {
                var loader = new ResourceLoader("Errors");
                DialogService.DisplayError(loader.GetString("Network/Caption"), loader.GetString("Network/Message"), "");
            }
        }
Exemplo n.º 2
0
 public async Task<VenueExt> GetVenueDetails(EventExt concert)
 {
     ContentResponse response = await _songkickClient.VenueDetails(concert.Venue.Id.Value);
     return response.ResultsPage.Results.Venues.First();
 }