Example #1
0
        private static void Run()
        {
            var venueDetailsList = new List <VenueDetails>();

            VenueList venues = GetVenues();

            if (venues == null)
            {
                Console.WriteLine("No venues returned.");
                return;
            }

            GetVenueDetails(venues, venueDetailsList);
            WriteVenuesToFile(venueDetailsList.ToArray());
        }
Example #2
0
        private static void GetVenueDetails(VenueList venues, List <VenueDetails> venueDetailsList)
        {
            int venuesLength = venues.Venues.Length;

            for (var index = 0; index < venuesLength; index++)
            {
                Console.WriteLine($"Getting venue details {index + 1} of {venuesLength}...");

                VenueDetails venueDetails = GetVenue(venues.Venues[index].Id);

                if (venueDetails == null)
                {
                    continue;
                }

                venueDetailsList.Add(venueDetails);
            }
        }