Exemplo n.º 1
0
        public static void ShowReviews()
        {
            var response = ZomatoInfo.GetReviews();

            var reviews = response.Reviews;

            Console.WriteLine($"Reviews found : {response.ReviewCount}");
            Console.WriteLine($"Reviews shown : {response.ReviewShown}");
            Console.WriteLine();

            Console.WriteLine($"{"Rating",-10} {"Rating Age",-50} {"Name",-60}");
            foreach (var r in reviews)
            {
                var review = r.Review;
                Console.WriteLine($"{review.Rating,-10} {review.RatingAge,-50} {review.Visitor.Name,-60}");
            }

            Console.ReadLine();
        }
Exemplo n.º 2
0
        public static void ShowRestaurants()
        {
            var response = ZomatoInfo.GetRestaurants();

            var restaurants = response.Restaurants;

            Console.WriteLine($"Results found : {response.ResultsFound}");
            Console.WriteLine($"Results shown : {response.ResultsShown}");
            Console.WriteLine();

            Console.WriteLine($"{"ID",-10} {"NAME",-50} {"CUISINES",-60} {"LOCATION",-40}");
            foreach (var r in restaurants)
            {
                var restaurant = r.Restaurant;

                Console.WriteLine($"{restaurant.ID,-10} {restaurant.Name,-50} {restaurant.Cuisines,-60} {restaurant.Location.LocalityVerbose,-40}");
            }

            Console.ReadLine();
        }