Endpoint | Description |
---|---|
GET /v1/pokemon/movesets | Gets a list of Pokémon movesets |
GET /v1/pokemon/movesets/:pokedex_id | Gets a Pokémon's moveset |
POST /v1/pokemon/movesets/:pokedex_id | Updates a Pokémon's moveset |
Gets a list of Pokémon movesets
Header:
GET /v1/pokemon/movesets
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_movesets". |
data[].attributes
|
object | |
data[].attributes.moveset
|
array | Pokémon moveset. |
data[].attributes.moveset[]
|
object | |
data[].attributes.moveset.move
|
object | |
data[].attributes.moveset.move.id
|
string | Move ID. |
data[].attributes.moveset.move.type
|
string | Type of move resource. Must be "move_names". |
data[].attributes.moveset.move.attributes
|
object | |
data[].attributes.moveset.move.attributes.name
|
string | Move name. |
data[].attributes.moveset.move.links
|
object | |
data[].attributes.moveset.move.links.self
|
string | Link to move resource. |
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_movesets",
"attributes": {
"moveset": [
{
"move": {
"id": "33",
"type": "move_names",
"attributes": {
"name": "TACKLE"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/33"
}
}
},
{
"move": {
"id": "45",
"type": "move_names",
"attributes": {
"name": "GROWL"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/45"
}
}
}
]
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/movesets/1"
}
},
...
],
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/movesets"
}
}
Gets a Pokémon's moveset
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:pokedex_id
|
string | ✔️ | Pokédex ID. |
Header:
GET /v1/pokemon/movesets/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
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_movesets". |
data.attributes
|
object | |
data.attributes.moveset
|
array | Pokémon moveset. |
data.attributes.moveset[]
|
object | |
data.attributes.moveset.move
|
object | |
data.attributes.moveset.move.id
|
string | Move ID. |
data.attributes.moveset.move.type
|
string | Type of move resource. Must be "move_names". |
data.attributes.moveset.move.attributes
|
object | |
data.attributes.moveset.move.attributes.name
|
string | Move name. |
data.attributes.moveset.move.links
|
object | |
data.attributes.moveset.move.links.self
|
string | Link to move resource. |
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: application/json
Server: pkmnapi/0.1.0
Body:
{
"data": {
"id": "1",
"type": "pokemon_movesets",
"attributes": {
"moveset": [
{
"move": {
"id": "33",
"type": "move_names",
"attributes": {
"name": "TACKLE"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/33"
}
}
},
{
"move": {
"id": "45",
"type": "move_names",
"attributes": {
"name": "GROWL"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/45"
}
}
}
]
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/movesets/1"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/movesets/1"
}
}
Updates a Pokémon's movesets
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_movesets". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.moveset
|
array | ✔️ | Pokémon moveset. |
body |
data.attributes.moveset[]
|
object | ✔️ | |
body |
data.attributes.moveset[].move
|
object | ✔️ | |
body |
data.attributes.moveset[].move.id
|
string | ✔️ | Move ID. |
Header:
POST /v1/pokemon/movesets/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: application/json
X-Patch-Description: Update BULBASAUR's moveset
Body:
{
"data": {
"type": "pokemon_movesets",
"attributes": {
"moveset": [
{
"move": {
"id": "1"
}
},
{
"move": {
"id": "2"
}
},
{
"move": {
"id": "3"
}
},
{
"move": {
"id": "4"
}
}
]
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}