Endpoint | Description |
---|---|
GET /v1/pokedex/texts | Gets a list of Pokédex texts |
GET /v1/pokedex/texts/:pokedex_id | Gets a Pokédex text |
POST /v1/pokedex/texts/:pokedex_id | Updates a Pokédex text |
Gets a list of Pokédex texts
Header:
GET /v1/pokedex/texts
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
array | |
data[]
|
object | |
data[].id
|
string |
Pokédex ID. (identical to :pokedex_id )
|
data[].type
|
string | Type of resource. Must be "pokedex_texts". |
data[].attributes
|
object | |
data[].attributes.text
|
string | Pokédex text. |
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": "pokedex_texts",
"attributes": {
"text": "A strange seed was\nplanted on its\nback at birth.¶The plant sprouts\nand grows with\nthis #MON"
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokedex/texts/1"
}
},
...
],
"links": {
"self": "https://api.pkmnapi.com/v1/pokedex/texts"
}
}
Gets a Pokédex text
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:pokedex_id
|
string | ✔️ | Pokédex ID. |
Header:
GET /v1/pokedex/texts/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string |
Pokédex ID. (identical to :pokedex_id )
|
data.type
|
string | Type of resource. Must be "pokedex_texts". |
data.attributes
|
object | |
data.attributes.text
|
string | Pokédex text. |
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": "pokedex_texts",
"attributes": {
"text": "A strange seed was\nplanted on its\nback at birth.¶The plant sprouts\nand grows with\nthis #MON"
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokedex/texts/1"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokedex/texts/1"
}
}
Updates a Pokédex text
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:pokedex_id
|
string | ✔️ | Pokédex ID. |
header |
X-Patch-Description
|
string | Description of change. | |
body |
data
|
object | ✔️ | |
body |
data.type
|
string | ✔️ | Type of data. Must be "pokedex_texts". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.text
|
string | ✔️ | Pokédex text. |
Header:
POST /v1/pokedex/texts/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: application/json
X-Patch-Description: Update BULBASAUR's species to LEAF
Body:
{
"data": {
"type": "pokedex_texts",
"attributes": {
"text": "When in disgrace\nwith fortune\nand men's eyes,¶I all alone beweep\nmy outcast\nstate"
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}