Mage Games Backend Case Study
Note: `config.toml file should be in the same folder as the build file.
http://139.59.213.250:8080
https://www.postman.com/mutluerdm/workspace/mage-test/collection/1085590-d557e6e6-d46b-4523-ae63-2c4179b711e7?action=share&creator=1085590
Post /v1/user/register
{
"username" : string,required,alphanum,min=3,max=10
"password" : bool,required,alphanum,min=3,max=10
}
{
"status": "success",
"timestamp": 1661201326,
"result":{
"id": 18,
"username": "erdem12",
"password": "5375Erdem"
}
}
Post /v1/user/login
{
"username" : string,required,alphanum,min=3,max=10
"password" : bool,required,alphanum,min=3,max=10
}
{
"status": "success",
"timestamp": 1661201326,
"result":{
"id": 18,
"username": "erdem12"
}
}
Post /v1/endgame
{
"players":
[
{"id":13, "score":15},
{"id":14, "score":20},
{"id":15, "score":9}
]
}
{
"status": "success",
"timestamp": 1661201444,
"result":[
{
"id": 16,
"score": 25
},
{
"id": 15,
"score": 45
},
{
"id": 13,
"score": 75
},
{
"id": 14,
"score": 100
}
]
}
Post /v1/leaderboard
-
{
"status": "success",
"timestamp": 1661201483,
"result": [
{
"id": 14,
"rank": 12
},
{
"id": 13,
"rank": 9
},
{
"id": 15,
"rank": 6
},
{
"id": 16,
"rank": 3
},
{
"id": 18,
"rank": 0
}
]
}