コード例 #1
0
ファイル: NowService.cs プロジェクト: lnmthuc/fos
        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));
        }