Trainer Pics

    EndpointDescription
    GET /v1/trainers/pics/:trainer_idGets a trainer's pic
    GET /v1/trainers/pics/:trainer_idUpdates a trainer's pic

    GET /v1/trainers/pics/:trainer_id

    Gets a trainer's pic

    Request Parameters

    Location Name Type Required? Description
    url :trainer_id string ✔️ Trainer ID.
    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".

    Example Request

    Header:

    GET /v1/trainers/pics/34
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Accept: image/png
    

    Body:

    None

    Response Parameters

    None

    Example Response

    Header:

    HTTP/1.1 200 OK
    Content-Type: image/png
    Content-Disposition: attachment; filename="BROCK.png"
    Server: pkmnapi/0.1.0
    

    Body:

    BROCK.png


    POST /v1/trainers/pics/:trainer_id

    Updates a trainer's pic

    Request Parameters

    Location Name Type Required? Description
    url :trainer_id string ✔️ Trainer ID.
    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 ✔️ Trainer pic.

    Example Request

    Header:

    POST /v1/trainers/pics/34
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Content-Type: image/png
    X-Patch-Description: Update BROCK's pic
    

    Body:

    rock.png

    ⚠️ Images must be 8-bit (or fewer) grayscale and the dimensions must be multiples of 8 pixels

    Response Parameters

    None

    Example Response

    Headers:

    HTTP/1.1 202 Accepted
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {}