This is an API to expose recipes from the Recipe API inventory.
Here are the request methods:
Method | Route | Description |
---|---|---|
GET |
/recipes | Returns a list of all recipes |
GET |
/recipes/random | Returns a random recipe |
GET |
/recipes/id | Returns a recipe with the provided ID Example response for recipe with ID 2 : { "id": 2 ,"name": "Pad Thai", "style": "Thai", "prep_time": "20 minutes", "cook_time": "10 minutes", "instructions": "1. Soak rice noodles in cold water for 20 minutes. 2. In a wok, heat oil and add garlic and onions. 3. Add shrimp or tofu and stir-fry for 2-3 minutes. 4. Push the shrimp or tofu to one side and add beaten eggs. 5. Stir-fry until the eggs are cooked. 6. Drain the noodles and add them to the wok. 7. Add fish sauce, sugar, and tamarind paste. 8. Stir-fry until all ingredients are mixed and the noodles are coated. 9. Serve hot with crushed peanuts and lime wedges." } |
POST |
/recipes | Accepts a recipe object with the following properties and will assign it an ID (integer )Example Object: { "name": string "Macaroni and Cheese","style": string "Southern","prep_time": string "30 minutes","cook_time": string "25 minutes","instructions": string "1. Make the mac based on box instructions. 2. Eat and enjoy. I'd spill my secrets if this wasn't a public API - ask me separately if you want the deets on my famous mac and cheese"} |