Endpoint | Description |
---|---|
GET /v1/tms/names | Gets a list of TM names |
GET /v1/tms/names/:tm_id | Gets a TM name |
POST /v1/tms/names/:tm_id | Updates a TM name |
Gets a list of TM names
Header:
GET /v1/tms/names/1
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_names". |
data[].attributes
|
object | |
data[].attributes.name
|
string | TM 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": "tm_names",
"attributes": {
"name": "TM01"
},
"links": {
"self": "https://api.pkmnapi.com/v1/tms/names/1"
}
},
...
],
"links": {
"self": "https://api.pkmnapi.com/v1/tms/names"
}
}
Gets a TM name
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:tm_id
|
string | ✔️ | TM ID. |
Header:
GET /v1/tms/names/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_names". |
data.attributes
|
object | |
data.attributes.name
|
string | TM 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": "tm_names",
"attributes": {
"name": "TM01"
},
"links": {
"self": "https://api.pkmnapi.com/v1/tms/names/1"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/tms/names/1"
}
}