コード例 #1
0
        /// <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);
        }
コード例 #2
0
        private async Task DownloadDataAsync()
        {
            var eventbriteService = new EventbriteService();

            EventbriteEvents = await eventbriteService.GetEventsAsync("Milwaukee");
        }