Endpoint | Description |
---|---|
GET /v1/pokemon/cries | Gets a list of Pokémon cries |
GET /v1/pokemon/cries/:pokedex_id | Gets a Pokémon's cry |
POST /v1/pokemon/cries/:pokedex_id | Updates a Pokémon's cry |
Gets a list of Pokémon cries
Header:
GET /v1/pokemon/cries
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
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. |
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"
}
}
Gets a Pokémon's cry
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". |
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
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. |
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"
}
}
Updates a Pokémon's cry
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. |
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
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}