-
Notifications
You must be signed in to change notification settings - Fork 0
Needed Endpoints
I'm lazy and dont really want to specify specific endpoints but specific functionalities more like. I'll basically just say what I want the request body to contain and what the response's correct body should look like. I havnt looked closely at Spoonaculars functionalities, so interpret these how you see fit. Ultimately, this should be updated to reflect what is actually implemented though.
Request Body:
{
ingredients: [String],
maxResults: Int,
filters: Optional {
maxCookTime: Int,
maxDifficulty: String,
dietaryRestrictions: [String],
...
}
}
ingredients is an array which contains all of the ingredients we want to filter on.
maxResults is the maximum number of recipes that should be returned.
filters is a list of additional filters we want to apply. It is optional to supply, and it's contents are also optional. I'm not sure of spoonaculars options so more than I show could be available.
Response Body:
{
recipes: {
recipeID: {
name: String,
imageURL: String,
ingredients: [String],
cookTime: DateTime?,
rating: Int,
difficulty: String
}
}
}
Basically, return a list of recipes, minus the details such as description and steps of each specific recipe. Just the info needed for a summary page.
Request Body:
{
recipeID: String
}
Response Body:
{
name: String,
imageURL: String,
ingredients: [String],
cookTime: DateTime?,
rating: Int,
difficulty: String
description: String,
steps: {
1: String
2: String
...
}
}
Request Body
{
maxResults: Int
}
Response Body:
{
recipes: {
recipeID: {
name: String,
imageURL: String,
ingredients: [String],
cookTime: DateTime?,
rating: Int,
difficulty: String
}
}
}
Response recipes should be presorted by rating. It should only include the top "maxResults" rated recipes.