Exemplo n.º 1
0
        public async Task <List <FoodCategory> > GetFoodCataloguesAsync(DeliveryInfos delivery)
        {
            //Get function
            APIDetail api = apisJson.GetDeliveryDishes;

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

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

            return(ConvertJson.ConvertString2ListFoodCatalogue(result));
        }