docker build -t stairoids .
docker run -p 9000:9000 stairoids
Expects a POST with the following body:
{
"username":"john",
"location":8,
"time":112,
}
Using CURL:
curl -d '{"username":"john","location":8,"time":112}' -H "Content-Type: application/json" -X POST http://localhost:9000/event
Expects a GET with as parameter the amount of floors climbed for this leaderboard. Example:
amount_of_floors=8
gives the best time per user ascending8
floors.amount_of_floors=-6
gives the best time per user descending6
floors.
Response:
[
{
"time": 10.0,
"username": "john"
},
{
"time": 6.0,
"username": "niels"
}
]