Recipe - Food - Nutrition

फ्रीमियम
Verified
द्वारा David | अपडेट किया गया 25 giorni fa | Food
लोकप्रियता

9.9 / 10

लेटेंसी

1,479ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Find by Nutrients not showing the correct results

Rapid account: Gaianilu
gaianilu
8 anni fa

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 anni fa

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 anni fa

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 anni fa

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 anni fa

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 anni fa

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

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें