If country is not sent in by the user, you will need to use the REST Countries API to randomly choose one country’s name.
For whichever country is either passed in or chosen at random, find recipes using the Edamam Recipe API
Note: use the q parameter to search for recipes related to that country
If the country parameter is either an empty string, or a value that doesn’t return any recipes, return an empty array:
{
"data": []
}
Testing should look for more than just the presence of attribute fields in the response. Testing should also determine which fields should NOT be present. (don’t send back unnecessary data in the response)
Completed, but with errors. Realized that it does not return "data" as specified, but ran out of time to refactor. Will leave this issue open to address in the future.
Getting Recipes for a Particular Country
Request:
Response:
The response data should contain exactly these elements and nothing more:
Example Response:
Requirements: