Endpoint | Description |
---|---|
GET /v1/savs/player_names | Gets saved player name |
POST /v1/savs/player_names | Updates saved player name |
Gets saved player name
Header:
GET /v1/savs/player_names
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string | Player ID. |
data.type
|
string | Type of resource. Must be "sav_player_names". |
data.attributes
|
object | |
data.attributes.name
|
string | Saved player 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": "1337",
"type": "sav_player_names",
"attributes": {
"name": "RED"
},
"links": {
"self": "https://api.pkmnapi.com/v1/savs/player_names"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/savs/player_names"
}
}
Updates saved player name
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 "sav_player_names". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.name
|
string | ✔️ | Saved player name. |
Header:
POST /v1/savs/player_names
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: application/json
X-Patch-Description: Update RED to ASH
Body:
{
"data": {
"type": "sav_player_names",
"attributes": {
"name": "ASH"
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}