Pokémon Cries

    EndpointDescription
    GET /v1/pokemon/criesGets a list of Pokémon cries
    GET /v1/pokemon/cries/:pokedex_idGets a Pokémon's cry
    POST /v1/pokemon/cries/:pokedex_idUpdates a Pokémon's cry

    GET /v1/pokemon/cries

    Gets a list of Pokémon cries

    Request Parameters

    None

    Example Request

    Header:

    GET /v1/pokemon/cries
    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 "pokemon_cries".
    data[].attributes object
    data[].attributes.base number Cry base.
    data[].attributes.pitch number Cry pitch.
    data[].attributes.length number Cry length.
    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": "pokemon_cries",
                "attributes": {
                    "base": 15,
                    "pitch": 128,
                    "length": 1
                },
                "links": {
                    "self": "https://api.pkmnapi.com/v1/pokemon/cries/1"
                }
            },
            ...
        ],
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokemon/cries"
        }
    }
    

    GET /v1/pokemon/cries/:pokedex_id

    Gets a Pokémon's cry

    Request Parameters

    Location Name Type Required? Description
    url :pokedex_id string ✔️ Pokédex ID.
    header Accept string ✔️ Type of result to return. Must be "application/json" or "audio/wav".

    Example Request

    Header:

    GET /v1/pokemon/cries/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Accept: audio/wav
    

    OR

    GET /v1/pokemon/cries/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Accept: application/json
    

    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 "pokemon_cries".
    data.attributes object
    data.attributes.base number Cry base.
    data.attributes.pitch number Cry pitch.
    data.attributes.length number Cry length.
    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: audio/wav
    Server: pkmnapi/0.1.0
    

    OR

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

    Body:

    OR

    {
        "data": {
            "id": "1",
            "type": "pokemon_cries",
            "attributes": {
                "base": 15,
                "pitch": 128,
                "length": 1
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/pokemon/cries/1"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokemon/cries/1"
        }
    }
    

    POST /v1/pokemon/cries/:pokedex_id

    Updates a Pokémon's cry

    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 "pokemon_cries".
    body data.attributes object ✔️
    body data.attributes.base number ✔️ Cry base.
    body data.attributes.pitch number ✔️ Cry pitch.
    body data.attributes.length number ✔️ Cry length.

    Example Request

    Header:

    POST /v1/pokemon/cries/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Content-Type: application/json
    X-Patch-Description: Update BULBASAUR's cry
    

    Body:

    {
        "data": {
            "type": "pokemon_cries",
            "attributes": {
                "base": 13,
                "pitch": 128,
                "length": 10
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Headers:

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

    Body:

    {}