Endpoint | Description |
---|---|
GET /v1/tms/prices | Gets a list of TM prices |
GET /v1/tms/prices/:tm_id | Gets a TM's price |
POST /v1/tms/prices/:tm_id | Updates a TM's price |
Gets a list of TM prices
Header:
GET /v1/tms/prices
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_prices". |
data[].attributes
|
object | |
data[].attributes.price
|
number | TM price. |
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_prices",
"attributes": {
"price": 3000
},
"links": {
"self": "https://api.pkmnapi.com/v1/tms/prices/1"
}
},
...
],
"links": {
"self": "https://api.pkmnapi.com/v1/tms/prices"
}
}
Gets a TM's price
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:tm_id
|
string | ✔️ | TM ID. |
Header:
GET /v1/tms/prices/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_prices". |
data.attributes
|
object | |
data.attributes.price
|
number | TM price. |
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_prices",
"attributes": {
"price": 3000
},
"links": {
"self": "https://api.pkmnapi.com/v1/tms/prices/1"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/tms/prices/1"
}
}
Updates a TM's price
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:tm_id
|
string | ✔️ | TM ID. |
header |
X-Patch-Description
|
string | Description of change. | |
body |
data
|
object | ✔️ | |
body |
data.type
|
string | ✔️ | Type of data. Must be "tm_prices". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.price
|
number | ✔️ | TM price. |
Header:
POST /v1/tms/prices/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: application/json
X-Patch-Description: Update TM01 price
Body:
{
"data": {
"type": "tm_prices",
"attributes": {
"price": 9000
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}