API Dokumentace

Info o serveru

GET https://czech-craft.eu/api/server/SERVER-SLUG/
{
    "address": "localhost",
    "name": "Server",
    "position": 1,
    "slug": "server",
    "votes": 4
}

Seznam hlasů

GET https://czech-craft.eu/api/server/SERVER-SLUG/votes/
{
    "data": [
        {
            "datetime": "2020-02-18 11:12:45",
            "delivered": false,
            "username": "ano95"
        },
        {
            "datetime": "2020-02-15 18:51:13",
            "delivered": true,
            "username": "ano95"
        },
        {
            "datetime": "2020-02-15 18:51:13",
            "delivered": false,
            "username": "ano95"
        }
    ],
    "vote_count": 4
}

Delivered označuje, zda byl dán hlas úspěšně zpracován Votifier-em na straně serveru.

Top hlasující (25)

GET https://czech-craft.eu/api/server/SERVER-SLUG/voters/
{
    "data": [
        {
            "username": "ano95",
            "votes": 3
        },
        {
            "username": "ferko",
            "votes": 1
        }
    ]
}

Hlasy hráče

GET https://czech-craft.eu/api/server/SERVER-SLUG/player/USERNAME/
{
    "next_vote": "2020-03-08 13:14:09",
    "username": "ano95",
    "vote_count": 3,
    "data": [
        {
            "datetime": "2020-02-15 18:51:13",
            "delivered": true,
            "username": "ano95"
        },
        {
            "datetime": "2020-02-15 18:51:13",
            "delivered": false,
            "username": "ano95"
        },
        {
            "datetime": "2020-02-18 11:12:45",
            "delivered": false,
            "username": "ano95"
        }
    ]
}

Hlasy za měsíc

GET https://czech-craft.eu/api/server/SERVER-SLUG/votes/2020/02/
{
    "data": [
        {
            "datetime": "2020-02-18 11:12:45",
            "delivered": false,
            "username": "ano95"
        },
        {
            "datetime": "2020-02-15 18:51:13",
            "delivered": true,
            "username": "ano95"
        },
        {
            "datetime": "2020-02-15 18:51:13",
            "delivered": false,
            "username": "ano95"
        },
        {
            "datetime": "2020-02-15 18:51:13",
            "delivered": false,
            "username": "ferko"
        }
    ],
    "vote_count": 4
}

Hlasy hráče za měsíc

GET https://czech-craft.eu/api/server/SERVER-SLUG/players/USERNAME/2020/02/
{
    "data": [
        {
            "datetime": "2020-02-18 11:12:45",
            "delivered": false,
            "username": "ano95"
        },
        {
            "datetime": "2020-02-15 18:51:13",
            "delivered": true,
            "username": "ano95"
        },
        {
            "datetime": "2020-02-15 18:51:13",
            "delivered": false,
            "username": "ano95"
        }
    ],
    "vote_count": 3
}
Banner