Warning
The public API has been shutdown. See archive/README.md for more info.
Bot that joins the skap.io game and collects data, then provides an API on the data
The public tokei-skap API lives on https://tokei.nightly.pw.
Timely leaderboards are sorted by the fastest to reach the area. Time is started when you entering the first area of a level, and ends when reaching the target area.
https://tokei.nightly.pw/api/leaderboard/timely
Options are Exodus 50 VICTORY
, Exodus 100 VICTORY
, Exodus 150 VICTORY
, Space Advanced 20 VICTORY
, Infernus 25
, Inferno 25
, and Nightmare 20
.
It can at most be 250 and is by default 35.
i.e. to fetch the Exodus 50 VICTORY
leaderboard with limit 50, URL would be https://tokei.nightly.pw/api/leaderboard/timely?area=Exodus 50 VICTORY&limit=50
.
An example response:
{
"areaName": "Exodus",
"placements": [
{
"playerName": "coolguy1234",
"dateReached": "2024-05-12 12:00:00",
"areaReached": "Exodus 100 VICTORY"
},
]
}
Date reached is encoded in (YYYY/mm/dd HH:mm:ss).
Completion leaderboards are ranked by the highest area achieved for a level. If multiple playerse reach the max possible area, it's ranked by who reached it first.
https://tokei.nightly.pw/api/leaderboard/completion
Options are Exodus
, Space Advanced
, Infernus
, Inferno
, Nightmare
, Glacier Advanced
, and April Fools
It can at most be 250 and is by default 35.
i.e. fetching leaderboards for Exodus
with limit 50 would give URL https://tokei.nightly.pw/api/leaderboard/completion?area=Exodus&limit=50
.
An example response:
{
"areaName": "Exodus",
"placements": [
{
"playerName": "coolguy1234",
"dateReached": "2024-05-12 12:00:00",
"areaReached": "Exodus 100 VICTORY"
},
]
}
Date reached is encoded in (YYYY/mm/dd HH:mm:ss).
Just hit the URL https://tokei.nightly.pw/api/playerCount
, and you will get a response looking like the one below.
{
"playerCount": 113
}
tokei-skap requires Node and npm
git clone https://github.com/premiering/tokei-skap.git
cd tokei-skap
npm i
Then start it normally
npm start
Or if you're like me use pm2 to manage Node processes
pm2 start npm -- start
No extra setup! Note that tokei-skap uses sqlite so the .db file will be relative to your working directory.
Most important things to change here is the port, and SSL configuration.
An example .env
(should be placed in the root project folder):
# .env
PORT=80
SSLPORT=443
DEBUGMODE=TRUE
SKAPURL=wss://skap.io
# How often in milliseconds should we ask the server what the player count is?
PLAYERCOUNTINTERVALMS=5000
SECONDARYOVERWORLDBOT=true
SSL=TRUE
PRIVATEKEY="/etc/coolcertificate/privkey.pem"
CERTIFICATE="/etc/coolcertificate/fullchain.pem"
ALLOWINVALIDSKAPSSL=true