TM Names

    EndpointDescription
    GET /v1/tms/namesGets a list of TM names
    GET /v1/tms/names/:tm_idGets a TM name
    POST /v1/tms/names/:tm_idUpdates a TM name

    GET /v1/tms/names

    Gets a list of TM names

    Request Parameters

    None

    Example Request

    Header:

    GET /v1/tms/names/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    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_names".
    data[].attributes object
    data[].attributes.name string TM name.
    data[].links object
    data[].links.self string Link to current resource.
    links object
    links.self string Link to list resource.

    Example Response

    Headers:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {
        "data": [
            {
                "id": "1",
                "type": "tm_names",
                "attributes": {
                    "name": "TM01"
                },
                "links": {
                    "self": "https://api.pkmnapi.com/v1/tms/names/1"
                }
            },
            ...
        ],
        "links": {
            "self": "https://api.pkmnapi.com/v1/tms/names"
        }
    }
    

    GET /v1/tms/names/:tm_id

    Gets a TM name

    Request Parameters

    Location Name Type Required? Description
    url :tm_id string ✔️ TM ID.

    Example Request

    Header:

    GET /v1/tms/names/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    Name Type Description
    data object
    data.id string TM ID. (identical to :tm_id)
    data.type string Type of resource. Must be "tm_names".
    data.attributes object
    data.attributes.name string TM name.
    data.links object
    data.links.self string Link to current resource.
    links object
    links.self string Link to current resource.

    Example Response

    Headers:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {
        "data": {
            "id": "1",
            "type": "tm_names",
            "attributes": {
                "name": "TM01"
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/tms/names/1"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/tms/names/1"
        }
    }