Recipe - Food - Nutrition

ÜCRETSİZ PREMIUM
Verified
Taraf David | Güncelleyen 25 days ago | Food
Popülerlik

9.9 / 10

Gecikme

1,479ms

Hizmet Düzeyi

100%

Health Check

N/A

Tüm Tartışmalara Dön

Find by Nutrients not showing the correct results

Rapid account: Gaianilu
gaianilu
8 years ago

If I send this request
https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/findByIngredients?fillIngredients=false&ingredients=apples%2Cflour%2Csugar&limitLicense=false&number=5&ranking=1
almost all results are way out of the ranges I set in the request. Am I misinterpreting the results?

Rapid account: Spoonacular
spoonacular Commented 8 years ago

Hi,

so the problem is that mashape did not use the correct camel casing. Please change in your request “minfat” to “minFat” and “mincarbs” to “minCarbs” etc. (also for calories and protein, min and max). I changed that again in mashape now, hope this time it sticks.

Also I added offset and limit parameters for paging.

Rapid account: Gaianilu
gaianilu Commented 8 years ago

Also, in the same request findByNutrients is there a way to show more than the default 10 results? Now I’m only getting 10 random recipes while I would like to iterate over all the set of recipes which should be returned.

Rapid account: Gaianilu
gaianilu Commented 8 years ago

For example with this request
https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/findByNutrients?maxcalories=250&maxcarbs=100&maxfat=20&maxprotein=100&mincalories=0&minCarbs=0&minfat=5&minProtein=0

I get recipes like
{
“id”: 167278,
“title”: “Double-Chocolate Cappuccino Cocoa”,
“image”: “https://spoonacular.com/recipeImages/Double-Chocolate-Cappuccino-Cocoa-167278.jpg”,
“imageType”: “jpg”,
“calories”: 394,
“protein”: “11g”,
“fat”: “25g”,
“carbs”: “36g”
}

where both calories and fat are out of the bounds I set. Almost all the results are like this.

Rapid account: Spoonacular
spoonacular Commented 8 years ago

Hey Gaianilu,

I checked the request but could not understand what the problem you are having is. Could you please clarify?

Rapid account: Spoonacular
spoonacular Commented 8 years ago

sorry for the delay, I will look into this issue shortly

Aşağıya yorum ekleyerek tartışmaya katılın:

Yeni yorumlar göndermek için giriş yapın / kaydolun