/// <summary> /// Get Events /// </summary> /// <returns></returns> public async Task <EventbriteEvents> GetEvents() { EventbriteEvents model = new EventbriteEvents(); try { //Get RestClient var client = GetRestClient(string.Empty); //Get Events IRestResponse response = await GetEvents(client); if (response.StatusCode != HttpStatusCode.OK) { _logger.LogInformation("Error"); } else { model = JsonConvert.DeserializeObject <EventbriteEvents>(response.Content); } } catch (Exception ex) { _logger.LogInformation(ex.Message); } return(model); }
private async Task DownloadDataAsync() { var eventbriteService = new EventbriteService(); EventbriteEvents = await eventbriteService.GetEventsAsync("Milwaukee"); }