Pokédex Texts

    EndpointDescription
    GET /v1/pokedex/textsGets a list of Pokédex texts
    GET /v1/pokedex/texts/:pokedex_idGets a Pokédex text
    POST /v1/pokedex/texts/:pokedex_idUpdates a Pokédex text

    GET /v1/pokedex/texts

    Gets a list of Pokédex texts

    Request Parameters

    None

    Example Request

    Header:

    GET /v1/pokedex/texts
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    Name Type Description
    data array
    data[] object
    data[].id string Pokédex ID. (identical to :pokedex_id)
    data[].type string Type of resource. Must be "pokedex_texts".
    data[].attributes object
    data[].attributes.text string Pokédex text.
    data[].links object
    data[].links.self string Link to current resource.
    links object
    links.self string Link to list resource.

    Example Response

    Headers:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {
        "data": [
            {
                "id": "1",
                "type": "pokedex_texts",
                "attributes": {
                    "text": "A strange seed was\nplanted on its\nback at birth.¶The plant sprouts\nand grows with\nthis #MON"
                },
                "links": {
                    "self": "https://api.pkmnapi.com/v1/pokedex/texts/1"
                }
            },
            ...
        ],
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokedex/texts"
        }
    }
    

    GET /v1/pokedex/texts/:pokedex_id

    Gets a Pokédex text

    Request Parameters

    Location Name Type Required? Description
    url :pokedex_id string ✔️ Pokédex ID.

    Example Request

    Header:

    GET /v1/pokedex/texts/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    Name Type Description
    data object
    data.id string Pokédex ID. (identical to :pokedex_id)
    data.type string Type of resource. Must be "pokedex_texts".
    data.attributes object
    data.attributes.text string Pokédex text.
    data.links object
    data.links.self string Link to current resource.
    links object
    links.self string Link to current resource.

    Example Response

    Headers:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {
        "data": {
            "id": "1",
            "type": "pokedex_texts",
            "attributes": {
                "text": "A strange seed was\nplanted on its\nback at birth.¶The plant sprouts\nand grows with\nthis #MON"
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/pokedex/texts/1"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokedex/texts/1"
        }
    }
    

    POST /v1/pokedex/texts/:pokedex_id

    Updates a Pokédex text

    Request Parameters

    Location Name Type Required? Description
    url :pokedex_id string ✔️ Pokédex ID.
    header X-Patch-Description string Description of change.
    body data object ✔️
    body data.type string ✔️ Type of data. Must be "pokedex_texts".
    body data.attributes object ✔️
    body data.attributes.text string ✔️ Pokédex text.

    Example Request

    Header:

    POST /v1/pokedex/texts/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Content-Type: application/json
    X-Patch-Description: Update BULBASAUR's species to LEAF
    

    Body:

    {
        "data": {
            "type": "pokedex_texts",
            "attributes": {
                "text": "When in disgrace\nwith fortune\nand men's eyes,¶I all alone beweep\nmy outcast\nstate"
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Headers:

    HTTP/1.1 202 Accepted
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {}