ajpulzone / lunch_and_learn

Mod 3 Final Solo Project
0 stars 0 forks source link

Happy Path: Endpoint #1 GET /api/v1/recipes?country=#{country} #2

Open ajpulzone opened 1 year ago

ajpulzone commented 1 year ago

Getting Recipes for a Particular Country

Request:

GET /api/v1/recipes?country=thailand
Content-Type: application/json
Accept: application/json

Response:

The response data should contain exactly these elements and nothing more:

Example Response:

{
    "data": [
        {
            "id": null,
            "type": "recipe",
            "attributes": {
                "title": "Andy Ricker's Naam Cheuam Naam Taan Piip (Palm Sugar Simple Syrup)",
                "url": "https://www.seriouseats.com/recipes/2013/11/andy-rickers-naam-cheuam-naam-taan-piip-palm-sugar-simple-syrup.html",
                "country": "thailand",
                "image": "https://edamam-product-images.s3.amazonaws.com..."
            }
        },
        {
            "id": null,
            "type": "recipe",
            "attributes": {
                "title": "Sriracha",
                "url": "http://www.jamieoliver.com/recipes/vegetables-recipes/sriracha/",
                "country": "thailand",
                "image": "https://edamam-product-images.s3.amazonaws.com/."
            }
        },
        {...},
        {...},
        {...},
        {etc},
    ]
}

Requirements:

{
  "data": []
}

Image

ajpulzone commented 1 year ago

Additions needed:

ajpulzone commented 1 year ago

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.