Endpoint | Description |
---|---|
GET /v1/pokemon/learnsets | Gets a list of Pokémon learnsets |
GET /v1/pokemon/learnsets/:pokedex_id | Gets a Pokémon's learnset |
POST /v1/pokemon/learnsets/:pokedex_id | Updates a Pokémon's learnset |
Gets a list of Pokémon learnsets
Header:
GET /v1/pokemon/learnsets
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_learnsets". |
data[].attributes
|
object | |
data[].attributes.learnset
|
array | Pokémon learnset. |
data[].attributes.learnset[]
|
object | |
data[].attributes.learnset.level
|
number | Learn level. |
data[].attributes.learnset.move
|
object | |
data[].attributes.learnset.move.id
|
string | Move ID. |
data[].attributes.learnset.move.type
|
string | Type of move resource. Must be "move_names". |
data[].attributes.learnset.move.attributes
|
object | |
data[].attributes.learnset.move.attributes.name
|
string | Move name. |
data[].attributes.learnset.move.links
|
object | |
data[].attributes.learnset.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_learnsets",
"attributes": {
"learnset": [
{
"level": 7,
"move": {
"id": "73",
"type": "move_names",
"attributes": {
"name": "LEECH SEED"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/73"
}
}
},
{
"level": 13,
"move": {
"id": "22",
"type": "move_names",
"attributes": {
"name": "VINE WHIP"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/22"
}
}
},
{
"level": 20,
"move": {
"id": "77",
"type": "move_names",
"attributes": {
"name": "POISONPOWDER"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/77"
}
}
},
{
"level": 27,
"move": {
"id": "75",
"type": "move_names",
"attributes": {
"name": "RAZOR LEAF"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/75"
}
}
},
{
"level": 34,
"move": {
"id": "74",
"type": "move_names",
"attributes": {
"name": "GROWTH"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/74"
}
}
},
{
"level": 41,
"move": {
"id": "79",
"type": "move_names",
"attributes": {
"name": "SLEEP POWDER"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/79"
}
}
},
{
"level": 48,
"move": {
"id": "76",
"type": "move_names",
"attributes": {
"name": "SOLARBEAM"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/76"
}
}
}
]
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/learnsets/1"
}
},
...
],
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/learnsets"
}
}
Gets a Pokémon's learnset
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:pokedex_id
|
string | ✔️ | Pokédex ID. |
Header:
GET /v1/pokemon/learnsets/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_learnsets". |
data.attributes
|
object | |
data.attributes.learnset
|
array | Pokémon learnset. |
data.attributes.learnset[]
|
object | |
data.attributes.learnset.level
|
number | Learn level. |
data.attributes.learnset.move
|
object | |
data.attributes.learnset.move.id
|
string | Move ID. |
data.attributes.learnset.move.type
|
string | Type of move resource. Must be "move_names". |
data.attributes.learnset.move.attributes
|
object | |
data.attributes.learnset.move.attributes.name
|
string | Move name. |
data.attributes.learnset.move.links
|
object | |
data.attributes.learnset.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_learnsets",
"attributes": {
"learnset": [
{
"level": 7,
"move": {
"id": "73",
"type": "move_names",
"attributes": {
"name": "LEECH SEED"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/73"
}
}
},
{
"level": 13,
"move": {
"id": "22",
"type": "move_names",
"attributes": {
"name": "VINE WHIP"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/22"
}
}
},
{
"level": 20,
"move": {
"id": "77",
"type": "move_names",
"attributes": {
"name": "POISONPOWDER"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/77"
}
}
},
{
"level": 27,
"move": {
"id": "75",
"type": "move_names",
"attributes": {
"name": "RAZOR LEAF"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/75"
}
}
},
{
"level": 34,
"move": {
"id": "74",
"type": "move_names",
"attributes": {
"name": "GROWTH"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/74"
}
}
},
{
"level": 41,
"move": {
"id": "79",
"type": "move_names",
"attributes": {
"name": "SLEEP POWDER"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/79"
}
}
},
{
"level": 48,
"move": {
"id": "76",
"type": "move_names",
"attributes": {
"name": "SOLARBEAM"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/76"
}
}
}
]
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/learnsets/1"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/learnsets/1"
}
}
Updates a Pokémon's learnsets
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_learnsets". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.learnset
|
array | ✔️ | Pokémon learnset. |
body |
data.attributes.learnset[]
|
object | ✔️ | |
body |
data.attributes.learnset[].level
|
number | ✔️ | Learn level. |
body |
data.attributes.learnset[].move
|
object | ✔️ | |
body |
data.attributes.learnset[].move.id
|
string | ✔️ | Move ID. |
Header:
POST /v1/pokemon/learnsets/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: application/json
X-Patch-Description: Update BULBASAUR's learnset
Body:
{
"data": {
"type": "pokemon_learnsets",
"attributes": {
"learnset": [
{
"level": 5,
"move": {
"id": "1"
}
},
{
"level": 6,
"move": {
"id": "2"
}
},
{
"level": 7,
"move": {
"id": "3"
}
},
{
"level": 8,
"move": {
"id": "4"
}
},
{
"level": 9,
"move": {
"id": "5"
}
},
{
"level": 10,
"move": {
"id": "6"
}
},
{
"level": 11,
"move": {
"id": "7"
}
}
]
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}