Exemplo n.º 1
0
        public List <Restaurant> GetRestaurantsByOutcode(string outcode)
        {
            var restClient  = restClientFactory.Create();
            var restRequest = restRequestFactory.CreateRestaurantByOutcodeRequest(outcode);
            var response    = restClient.Execute <RestaurantDataRoot>(restRequest);

            var restaurantData = response.StatusCode == HttpStatusCode.OK ? response.Data.Restaurants : new List <Restaurant>();

            return(restaurantData);
        }