Plan-My-Dinner / plan_my_dinner_be

Backend Service Repo for the Plan My Dinner Application
https://planmydinner.fly.dev/
0 stars 0 forks source link

[Route]: GET - Recipe Show #14

Open aleish-m opened 1 year ago

aleish-m commented 1 year ago

Feature description

This route should make a call to lookup full recipe details by id using TheMealDB.

Is this a route?

CRUD Action

{"GET"}

Route Path / Description

v1/recipe/<id>

Success - JSON Contract Example

{ Recipe: { 
   ID: "52772"
   Title: "Teriyaki Chicken Casserole",
   Image_URL: "www.themealdb.com/images/media/meals/wxuvuv1511299147.jpg",
   Recipe_URL: "www.bbcgoodfood.com/recipes/jacks-pork-cassoulet",
   Cuisine Type: "Japanese",
   Ingredients: [
     { quantity: 3/4cups
         item: soy sauce} - Use Key values not strings per meeting
    "3/4 cup soy sauce",
    "1/2 cup - water",
    "1/4 cup - brown sugar",
    "1/2 teaspoon - ground ginger",
    "1/2 teaspoon - minced garlic",
    "4 Tablespoons - cornstarch",
    "2 - chicken breasts",
    "1 (12 oz.) - stir-fry vegetables",
    "3 cups - brown rice"
    ],
   Instructions: [
    "Preheat oven to 350\u00b0 F. Spray a 9x13-inch baking pan with non-stick spray.", 
    "Combine soy sauce, \u00bd cup water, brown sugar, ginger and garlic in a small saucepan and cover. Bring to a boil over medium heat. Remove lid and cook for one minute once boiling.", 
    "Meanwhile, stir together the corn starch and 2 tablespoons of water in a separate dish until smooth. Once sauce is boiling, add mixture to the saucepan and stir to combine. Cook until the sauce starts to thicken then remove from heat.",
    "Place the chicken breasts in the prepared pan. Pour one cup of the sauce over top of chicken. Place chicken in oven and bake 35 minutes or until cooked through. Remove from oven and shred chicken in the dish using two forks.", 
    "Meanwhile, steam or cook the vegetables according to package directions.", 
    "Add the cooked vegetables and rice to the casserole dish with the chicken. Add most of the remaining sauce, reserving a bit to drizzle over the top when serving. Gently toss everything together in the casserole dish until combined. Return to oven and cook 15 minutes. Remove from oven and let stand 5 minutes before serving. Drizzle each serving with remaining sauce. Enjoy!"
    ],
   Video_URL: "www.youtube.com/watch?v=4aZr5hZXP_s" 
  }
}

Success - Return status code

200

Fail - JSON Contract Example(s)

Invalid ID:

API Unavailable:
Status: 503 (Service Unavailable)
Error Message for Service Unavailable

Anything else?

Remember: Use GitHub branch creation for naming Image