Endpoint | Description |
---|---|
GET /v1/player_names | Gets default player names |
POST /v1/player_names | Updates default player names |
Gets default player names
Header:
GET /v1/player_names
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string | ID. Must be "0". |
data.type
|
string | Type of resource. Must be "player_names". |
data.attributes
|
object | |
data.attributes.player
|
array | Player names. |
data.attributes.player[]
|
string | Player name. |
data.attributes.rival
|
array | Rival names. |
data.attributes.rival[]
|
string | Rival 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": "0",
"type": "player_names",
"attributes": {
"player": [
"RED",
"ASH",
"JACK"
],
"rival": [
"BLUE",
"GARY",
"JOHN"
]
},
"links": {
"self": "https://api.pkmnapi.com/v1/player_names"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/player_names"
}
}
Updates default player names
Location | Name | Type | Required? | Description |
---|---|---|---|---|
header |
X-Patch-Description
|
string | Description of change. | |
body |
data
|
object | ✔️ | |
body |
data.type
|
string | ✔️ | Type of data. Must be "player_names". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.player
|
array | ✔️ | Player names. |
body |
data.attributes.player[]
|
string | ✔️ | Player name. |
body |
data.attributes.rival
|
array | ✔️ | Rival names. |
body |
data.attributes.rival[]
|
string | ✔️ | Rival name. |
Header:
POST /v1/player_names
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: application/json
X-Patch-Description: Update default player names
Body:
{
"data": {
"type": "player_names",
"attributes": {
"player": [
"BED",
"ASK",
"JILL"
],
"rival": [
"TRUE",
"MARY",
"JANE"
]
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}