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