Endpoint
https://api.craftlist.org/v1/Server_API_token/votes/Year/Month
Options
Option name |
Allowed values |
Decription |
Default |
nickname |
string |
Get votes for specific player |
Not specified |
merge |
boolean (1/0) |
Group votes by nicknames |
0 |
limit |
integer |
Limit results |
Not specified |
Example 1
Get all server votes for specific month
GET https://api.craftlist.org/v1/82d42486c5c35d98dfab/votes/2019/7
[
{
"nickname":"Rixafy",
"score": 3,
"ip": "89.203.25.74",
"timestamp": 1563560697,
},
{
"nickname":"Rixafy",
"score": 3,
"ip": "89.203.25.74",
"timestamp": 1563560123,
},
{
"nickname":"haelexuis",
"score": 3,
"ip": "2a00:1027:83a4:42d6:64b5:8768:b365:866b",
"timestamp": 1563568525,
}
]
Example 2
Get all server votes for specific month and group them by nicknames
GET https://api.craftlist.org/v1/82d42486c5c35d98dfab/votes/2019/7?merge=1
[
{
"nickname":"Rixafy",
"votes": 2,
"score": 6,
"lastIp": "89.203.25.74",
"lastVote": 1563560697,
"nextPossibleVote": 1563561697,
},
{
"nickname":"haelexuis",
"votes": 1,
"score": 3,
"lastIp": "2a00:1027:83a4:42d6:64b5:8768:b365:866b",
"lastVote": 1563568525,
"nextPossibleVote": 1563569525,
}
]
Example 3
Get all votes for specific player
GET https://api.craftlist.org/v1/82d42486c5c35d98dfab/votes/2019/7?nickname=Rixafy
[
{
"nickname":"Rixafy",
"score": 3,
"ip": "89.203.25.74",
"timestamp": 1563560697,
},
{
"nickname":"Rixafy",
"score": 3,
"ip": "89.203.25.74",
"timestamp": 1563560123,
}
]
Example 4
Get all votes for specific player and group them to one record
GET https://api.craftlist.org/v1/82d42486c5c35d98dfab/votes/2019/7?nickname=Rixafy&merge=1
[
{
"nickname":"Rixafy",
"votes": 2,
"score": 6,
"lastIp": "89.203.25.74",
"lastVote": 1563560697,
"nextPossibleVote": 1563561697,
}
]