Recipe - Food - Nutrition

פרמיום
Verified
על ידי David | מְעוּדכָּן 17 days ago | Food
פּוֹפּוּלָרִיוּת

9.9 / 10

חֶבִיוֹן

517ms

רמת שירות

100%

Health Check

N/A

חזרה לכל הדיונים

Search by Ingredients

Rapid account: Stefcenti
stefcenti
8 years ago

I’m not sure if this api is actually broken or if I don’t know how to use it. I can successfully call the function with /recipes/findByIngredients? and I get the json back but I have no idea how to get to the list of recipes returned. There is an array of recipes returned but I don’t see a tag to access the recipes. In the complex search I see there is a “results:” tag but there is not one for the search by ingredient.

Any information would be helpful.

Thanks!

Stefanie Centi

stefcenti@centiumtech.com

Rapid account: Stefcenti
stefcenti Commented 8 years ago

Thanks David - I was trying to access the result.body before it was returned from the API. I still sometimes forget about the asynchronous nature of node!

Rapid account: Spoonacular
spoonacular Commented 8 years ago

Hi Stefanie,

The id field in the response is the id of the recipe and title is the title. To get more information about the recipe, call the recipe information endpoint with the given ids (https://market.mashape.com/spoonacular/recipe-food-nutrition#get-recipe-information).

Hope that helps?

David

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות