Endpoint | Description |
---|---|
GET /v1/pokemon/pics/:pokedex_id | Gets a Pokémon's pic |
POST /v1/pokemon/pics/:pokedex_id | Updates a Pokémon's pic |
Gets a Pokémon's pic
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:pokedex_id
|
string | ✔️ | Pokédex ID. |
query |
face
|
string | Face to return. Must be "front" or "back". | |
query |
mirror
|
bool | Enable horizontal mirroring. Must be "true" or "false". | |
header |
Accept
|
string | Type of image to return. Must be "image/png" or "image/jpeg". |
Header:
GET /v1/pokemon/pics/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Accept: image/png
Body:
None
Header:
HTTP/1.1 200 OK
Content-Type: image/png
Content-Disposition: attachment; filename="BULBASAUR.png"
Server: pkmnapi/0.1.0
Body:
Updates a Pokémon's pic
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:pokedex_id
|
string | ✔️ | Pokédex ID. |
query |
face
|
string | Face to upload. Must be "front" or "back". | |
query |
method
|
number | Encoding method. Must be 1, 2, or 3. | |
query |
prinary
|
number | Primary buffer. Must be 0 or 1. | |
header |
Content-Type
|
string | Type of image to upload. Must be "image/png" or "image/jpeg". | |
header |
X-Patch-Description
|
string | Description of change. | |
body |
<raw>
|
binary | ✔️ | Pokémon pic. |
Header:
POST /v1/pokemon/pics/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: image/png
X-Patch-Description: Update BULBASAUR's pic
Body:
⚠️ Images must be 8-bit (or fewer) grayscale and the dimensions must be multiples of 8 pixels
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}