pokeapi icon indicating copy to clipboard operation
pokeapi copied to clipboard

Missing documentation for unnamed API resources

Open AnActualEmerald opened this issue 1 year ago • 4 comments

Some paginated endpoints return API resources without a name field, but this behavior isn't mentioned anywhere in the docs.

Steps to Reproduce:

curl "https://pokeapi.co/api/v2/evolution-chain?limit=3" | jq

Results in the output:

{
  "count": 541,
  "next": "https://pokeapi.co/api/v2/evolution-chain?offset=3&limit=3",
  "previous": null,
  "results": [
    {
      "url": "https://pokeapi.co/api/v2/evolution-chain/1/"
    },
    {
      "url": "https://pokeapi.co/api/v2/evolution-chain/2/"
    },
    {
      "url": "https://pokeapi.co/api/v2/evolution-chain/3/"
    }
  ]
}

Where the resources in the results array just have a url and no name

AnActualEmerald avatar Apr 02 '24 18:04 AnActualEmerald

Hi, I modified the docs: https://staging.pokeapi.co/docs/v2#resource-listspagination-section Can you check before merging?

Check the Resource Lists/Pagination section

Naramsim avatar Apr 02 '24 20:04 Naramsim

Looks good to me, thanks 👍

AnActualEmerald avatar Apr 02 '24 21:04 AnActualEmerald

Hey there!

Sorry to intrude in the discussion, but is there a way to be a bit more precise about this? Like flagging or listing which endpoints are named/unamed? As is, the docs do not tell how to read the data, which can be tedious while deserializing the payload

mlemesle avatar Apr 02 '24 22:04 mlemesle

Hi, in the new docs I added the entry:

characteristic, contest-effect, evolution-chain, machine, super-contest-effect endpoints are unnamed, the rest are named.

Naramsim avatar Apr 03 '24 15:04 Naramsim