Endpoint | Description |
---|---|
GET /v1/tms/moves | Gets a list of TM moves |
GET /v1/tms/moves/:tm_id | Gets a TM's move |
POST /v1/tms/moves/:tm_id | Updates a TM's move |
Gets a list of TM moves
Header:
GET /v1/tms/moves
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
array | |
data[]
|
object | |
data[].id
|
string |
TM ID. (identical to :tm_id )
|
data[].type
|
string | Type of resource. Must be "tm_moves". |
data[].attributes
|
object | |
data[].attributes.move
|
object | |
data[].attributes.move.id
|
string | Move ID. |
data[].attributes.move.type
|
string | Type of resource. Must be "move_names". |
data[].attributes.move.attributes
|
object | |
data[].attributes.move.attributes.name
|
string | Move name. |
data[].attributes.move.links
|
object | |
data[].attributes.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": "tm_moves",
"attributes": {
"move": {
"id": "5",
"type": "move_names",
"attributes": {
"name": "MEGA PUNCH"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/5"
}
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/tms/moves/1"
}
},
...
],
"links": {
"self": "https://api.pkmnapi.com/v1/tms/moves"
}
}
Gets a TM's move
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:tm_id
|
string | ✔️ | TM ID. |
Header:
GET /v1/tms/moves/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string |
TM ID. (identical to :tm_id )
|
data.type
|
string | Type of resource. Must be "tm_moves". |
data.attributes
|
object | |
data.attributes.move
|
object | |
data.attributes.move.id
|
string | Move ID. |
data.attributes.move.type
|
string | Type of resource. Must be "move_names". |
data.attributes.move.attributes
|
object | |
data.attributes.move.attributes.name
|
string | Move name. |
data.attributes.move.links
|
object | |
data.attributes.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": "tm_moves",
"attributes": {
"move": {
"id": "5",
"type": "move_names",
"attributes": {
"name": "MEGA PUNCH"
},
"links": {
"self": "https://api.pkmnapi.com/v1/moves/names/5"
}
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/tms/moves/1"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/tms/moves/1"
}
}
Updates a TM's move
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:tm_id
|
string | ✔️ | TM ID. |
header |
X-Patch-Description
|
string | Description of change. | |
body |
data
|
object | ✔️ | |
body |
data.type
|
string | ✔️ | Type of data. Must be "tm_moves". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.move
|
object | ✔️ | |
body |
data.attributes.move.id
|
string | ✔️ | Move ID. |
Header:
POST /v1/tms/moves/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: application/json
X-Patch-Description: Update MEGA PUNCH to TELEPORT
Body:
{
"data": {
"type": "tm_moves",
"attributes": {
"move": {
"id": "100"
}
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}