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