Skip to content

PROTOTYPE

Varshitha Uppula edited this page Apr 3, 2021 · 3 revisions

API specs
An example of querying the 3rd party api is-
https://api.edamam.com/search?q=chicken&app_id=3a97f0d0&app_key=3a458b2fd268ece413a2f798bdea4b71

NOTES:
The recipe to be searched has to be passed as a query parameter. In the above example, chicken is queried – q=chicken
This api requires an api id and key. In the above example, api id and key are app_id=3a97f0d0 and app_key=3a458b2fd268ece413a2f798bdea4b71

Steps for an end user to search for a recipe -
Navigate to the 4 buttons under the text “Here’s how we work” on the home page – https://gethealthy123.herokuapp.com/home
Click on the 4th button, this button is for searching recipes.
Click on “Know More” to navigate to the search page

Query- Assuming we queried for a chicken recipe (q=chicken), then the api return the following json object
{
“q”:“chicken”,
from,
to,
more,
count,
hits[…]
}

The main data is in the “hits” section.

Search page – Upon querying chicken, the list of json objects under the hits section are parsed and displayed as a list in the search page- https://gethealthy123.herokuapp.com/search/chicken

“hits” is a list of json objects of the following structure-
“hits”:
[
{“recipe”: {…}
“bookmarked: false
“bought”: false
},
{…},
{…},

]

The “recipe” json object contains the main data of a recipe and has the following structure-
“Recipe” :
{
“uri”:“http://www.edamam.com/ontologies/edamam.owl#recipe_b79327d05b8e5b838ad6cfd9576b30b6”
“label”:“Chicken Vesuvio”
“image”:“https://www.edamam.com/web-img/e42/e42f9119813e890af34c259785ae1cfb.jpg”
“dietLabels”: [“Low-Carb”]
“mealType”:[“lunch/dinner”]
“dishType”:“main course”
“healthLabels”:[…]
“ingredientLines”:[…]
“ingredients”:[…]
“calories”:4228.043058200812

}

Details Screen- The above mentioned are the details that the recipe object contains and these details are displayed in the Details Screen page – https://gethealthy123.herokuapp.com/details/b79327d05b8e5b838ad6cfd9576b30b6

Clone this wiki locally