Skip to content

Support paged resource lists? #365

@sargunv

Description

@sargunv

https://pokeapi.co/docsv2/#resource-lists

Currently, calling something like /api/v2/pokemon-species/ return a list limited to 20 items. The GET params offset and limit are also supported to scan through the resource list. The next and previous fields allow a client to scan through the list.

Example response:

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

The static files API returns the full list, with no support for offset or limit. This will break backwards compatibility for clients that depend on limit and/or offset.

We have two options:

  1. Serve the static files as-is, and drop support for limit and offset.
  2. Run a service somewhere that implements the current resource list behavior and redirect resource list requests there.
    • ditto serve already implements this

@tdmalone @cmmartti @neverendingqs @lmerotta as interested parties in the migration to static files.

I'll write my thoughts on this in a reply to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions