Recipe - Food - Nutrition

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

9.9 / 10

लेटेंसी

1,542ms

सेवा का स्तर

100%

Health Check

N/A

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

Get ingredient substitutes by ingredient name does not allow query by name

Rapid account: Andy Rollins
andy.rollins
7 anni fa

I’m trying to call the Get ingredient substitutes by ingredient name API using the following URL: (as per the example on mashape)

https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/food/ingredients/substitutes?ingredientname=butter

However it errors as follows saying it couldn’t find an ingredient with that ID, this is the same if you use the test functionality on the mashape website. Response shown by mashape below:

HTTP/1.1 200 OK
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: : GET, HEAD, POST, OPTIONS, DELETE, PUT
Allow-Control-Allow-Methods: : GET, HEAD, POST, OPTIONS, DELETE, PUT
Allow-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 89
Content-Type: application/json
Date: Mon, 06 Feb 2017 15:51:01 GMT
Server: Mashape/5.0.6
X-Ratelimit-Classifications-Limit: 50
X-Ratelimit-Classifications-Remaining: 50
X-Ratelimit-Requests-Limit: 50
X-Ratelimit-Requests-Remaining: 45
X-Ratelimit-Tinyrequests-Limit: 500
X-Ratelimit-Tinyrequests-Remaining: 500

{
“status”: “failure”,
“message”: “Could not find any ingredient by that id.”
}

It would appear it’s searching on IDs rather than name.

Rapid account: Spoonacular
spoonacular Commented 7 anni fa

Sorry, this is a mashape bug, the parameter should be camel case “ingredientName”. I reported that to mashape yesterday.

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

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