Esempio n. 1
0
        public async Task <DeliveryDetail> GetRestaurantDetailAsync(Restaurant restaurant)
        {
            //Get function
            APIDetail api = apisJson.GetRestaurantDetail;

            //Set Fields
            api.AvailableParams.Where(a => a.FieldName == "request_id").FirstOrDefault().ValueDefault
                = restaurant.delivery_id.ToString();
            //Call API
            RequestMethodFactory method = new RequestMethodFactory(api);
            var response = await method.CallApiAsync();

            var result = response.Content.ReadAsStringAsync().Result;

            return(ConvertJson.ConvertString2DeliveryInfos(result));
        }