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