HM Names

    EndpointDescription
    GET /v1/hms/namesGets a list of HM names
    GET /v1/hms/names/:hm_idGets a HM name
    POST /v1/hms/names/:hm_idUpdates a HM name

    GET /v1/hms/names

    Gets a list of HM names

    Request Parameters

    None

    Example Request

    Header:

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

    Body:

    None

    Response Parameters

    Name Type Description
    data array
    data[] object
    data[].id string HM ID. (identical to :hm_id)
    data[].type string Type of resource. Must be "hm_names".
    data[].attributes object
    data[].attributes.name string HM 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": "hm_names",
                "attributes": {
                    "name": "HM01"
                },
                "links": {
                    "self": "https://api.pkmnapi.com/v1/hms/names/1"
                }
            },
            ...
        ],
        "links": {
            "self": "https://api.pkmnapi.com/v1/hms/names"
        }
    }
    

    GET /v1/hms/names/:hm_id

    Gets a HM name

    Request Parameters

    Location Name Type Required? Description
    url :hm_id string ✔️ HM ID.

    Example Request

    Header:

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

    Body:

    None

    Response Parameters

    Name Type Description
    data object
    data.id string HM ID. (identical to :hm_id)
    data.type string Type of resource. Must be "hm_names".
    data.attributes object
    data.attributes.name string HM 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": "hm_names",
            "attributes": {
                "name": "HM01"
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/hms/names/1"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/hms/names/1"
        }
    }