btholt / complete-intro-to-react-v6

learn React.js with Brian Holt
https://frontendmasters.com/courses/complete-react-v6/
Other
1.47k stars 215 forks source link

pets-v2 api is categorizing various Macaws and Parrots as cats #53

Open ToddKerpelman opened 2 years ago

ToddKerpelman commented 2 years ago

Sorry -- couldn't seem to find the dev-apis component to file this against, so I'm filing it here.

I added some pagination to my completed project (hooray!) and got back some rather confusing results that I thought were issues in my data, but turned out to be an issue with the API. Specifically, if you check out something like

https://pets-v2.dev-apis.com/pets?animal=cat&location=&breed=&page=1

You'll see at the bottom a few results like:

    {
      "id": 37,
      "name": "Rose",
      "animal": "cat",
      "city": "Minneapolis",
      "state": "MN",
      "description": "Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis.",
      "breed": "Parrot",
      "images": [
        "http://pets-images.dev-apis.com/pets/bird6.jpg"
      ]
    },
    {
      "id": 39,
      "name": "Mayne",
      "animal": "cat",
      "city": "Dayton",
      "state": "OH",
      "description": "Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros.\n\nVestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat.",
      "breed": "Macaw",
      "images": [
        "http://pets-images.dev-apis.com/pets/bird3.jpg"
      ]
    },

Perhaps this is some very clever adaption on the part of cats to better catch their dinner by disguising themselves as exotic birds, but I'm thinking maybe it's just a copy-and-paste error in the API.

Anyway, not a huge deal, but it definitely made me think I was doing something wrong at first.