Skip to content

mutluerdm/mage_test_case

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mage_test_case

Mage Games Backend Case Study

Note: `config.toml file should be in the same folder as the build file.

testing host

http://139.59.213.250:8080

postman collection for testing

https://www.postman.com/mutluerdm/workspace/mage-test/collection/1085590-d557e6e6-d46b-4523-ae63-2c4179b711e7?action=share&creator=1085590

register

Post /v1/user/register

params

{
  "username" : string,required,alphanum,min=3,max=10
  "password" : bool,required,alphanum,min=3,max=10
}

example response

{
"status": "success",
"timestamp": 1661201326,
"result":{
  "id": 18,
  "username": "erdem12",
  "password": "5375Erdem"
  }
}

login

Post /v1/user/login

params

{
  "username" : string,required,alphanum,min=3,max=10
  "password" : bool,required,alphanum,min=3,max=10
}

example response

{
"status": "success",
"timestamp": 1661201326,
"result":{
  "id": 18,
  "username": "erdem12"
  }
}

endgame

Post /v1/endgame

params

{
"players":
   [
    {"id":13, "score":15}, 
    {"id":14, "score":20},  
    {"id":15, "score":9}
   ]
 }

example response

{
"status": "success",
"timestamp": 1661201444,
"result":[
    {
      "id": 16,
      "score": 25
    },
    {
      "id": 15,
      "score": 45
    },
    {
      "id": 13,
      "score": 75
    },
    {
      "id": 14,
      "score": 100
    }
  ]
}

get leaderboard

Post /v1/leaderboard

params

-

example response

{
  "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
    }
  ]
}

About

Mage Games Backend Case Study

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages