API¶
-
GET
/asterios/{team}/member/{team_member}
¶ Return a member of team.
Parameters: - team (string) –
- team_member (string) –
Status Codes: - 200 OK –
Response JSON Object: - difficulty (any) – The difficulty of set of puzzle.
- level (integer) – The starting level
- level_max (integer) – The last level.
- levels_obj.level (integer) – (required) The current theme
- levels_obj.theme (string) – (required) The current level
- name (string) – (required) The name of the team member
- theme (string) – The theme of set of puzzle. It will be randomly chosen if is it not set by the user.
-
PUT
/asterios/{team}/member/{team_member}/puzzle
¶ Get puzzle of current level. A new puzzle is generated for each request
Parameters: - team (string) –
- team_member (string) –
Status Codes: - 200 OK – A question is generated and returned.
- 404 Not Found – If the game or team member doesn’t exist
-
PUT
/asterios/{team}/member/{team_member}/solve
¶ Try to solve the puzzle sending a response in the request body.
Parameters: - team (string) –
- team_member (string) –
Status Codes: - 201 Created – The puzzle is solved.
- 404 Not Found – If the game or team member doesn’t exist
- 400 Bad Request – The puzzle isn’t solved.
-
GET
/game-config
¶ Return all created game.
Status Codes: - 200 OK –
Response JSON Object: - [].duration (integer) – The game duration in minute
- [].remaining (integer) – (required) The remaining time in minute
- [].start_at (string) – (required) The starting date
- [].state (string) – (required) The state of game can be “ready”, “started” or “stopped”
- [].team (string) – (required) The name of team
- [].team_members[].difficulty (any) – The difficulty of set of puzzle.
- [].team_members[].level (integer) – The starting level
- [].team_members[].level_max (integer) – The last level.
- [].team_members[].name (string) – (required) The name of the team member
- [].team_members[].theme (string) – The theme of set of puzzle. It will be randomly chosen if is it not set by the user.
- [].won_at (string) – (required) The date of victory in ISO 8601 format
-
POST
/game-config
¶ Create a new game, The game will be identified by the name of the team. Each game has one uniq team. when the game is created, you should start it using PUT request on /game-config/{team}/start route
Request JSON Object: - duration (integer) – The game duration in minute
- team (string) – (required) The name of team
- team_members[].difficulty (any) – The difficulty of set of puzzle.
- team_members[].level (integer) – The starting level
- team_members[].level_max (integer) – The last level.
- team_members[].name (string) – (required) The name of the team member
- team_members[].theme (string) – The theme of set of puzzle. It will be randomly chosen if is it not set by the user.
Status Codes: - 201 Created – The game is created.
- 409 Conflict –
Response JSON Object: - duration (integer) – The game duration in minute
- remaining (integer) – (required) The remaining time in minute
- start_at (string) – (required) The starting date
- state (string) – (required) The state of game can be “ready”, “started” or “stopped”
- team (string) – (required) The name of team
- team_members[].difficulty (any) – The difficulty of set of puzzle.
- team_members[].level (integer) – The starting level
- team_members[].level_max (integer) – The last level.
- team_members[].name (string) – (required) The name of the team member
- team_members[].theme (string) – The theme of set of puzzle. It will be randomly chosen if is it not set by the user.
- won_at (string) – (required) The date of victory in ISO 8601 format
-
DELETE
/game-config/{name}
¶ Delete a created game.
Parameters: - name (string) –
Status Codes: - 200 OK – The game is deleted.
- 404 Not Found – The game is not found.
-
GET
/game-config/{name}
¶ Get a game from the team name.
Parameters: - name (string) –
Status Codes: - 200 OK – Return the game.
- 404 Not Found – The game is not found
Response JSON Object: - duration (integer) – The game duration in minute
- remaining (integer) – (required) The remaining time in minute
- start_at (string) – (required) The starting date
- state (string) – (required) The state of game can be “ready”, “started” or “stopped”
- team (string) – (required) The name of team
- team_members[].difficulty (any) – The difficulty of set of puzzle.
- team_members[].level (integer) – The starting level
- team_members[].level_max (integer) – The last level.
- team_members[].name (string) – (required) The name of the team member
- team_members[].theme (string) – The theme of set of puzzle. It will be randomly chosen if is it not set by the user.
- won_at (string) – (required) The date of victory in ISO 8601 format
-
PUT
/game-config/{name}/add-member
¶ Add a new team member to a game. The state of game must be ready.
Parameters: - name (string) –
Request JSON Object: - difficulty (any) – The difficulty of set of puzzle.
- level (integer) – The starting level
- level_max (integer) – The last level.
- name (string) – (required) The name of the team member
- theme (string) – The theme of set of puzzle. It will be randomly chosen if is it not set by the user.
Status Codes: - 200 OK – The new member is added to the game.
- 404 Not Found – The game does not exist.
- 409 Conflict – The state of game do not allow to add a member.
Response JSON Object: - duration (integer) – The game duration in minute
- remaining (integer) – (required) The remaining time in minute
- start_at (string) – (required) The starting date
- state (string) – (required) The state of game can be “ready”, “started” or “stopped”
- team (string) – (required) The name of team
- team_members[].difficulty (any) – The difficulty of set of puzzle.
- team_members[].level (integer) – The starting level
- team_members[].level_max (integer) – The last level.
- team_members[].name (string) – (required) The name of the team member
- team_members[].theme (string) – The theme of set of puzzle. It will be randomly chosen if is it not set by the user.
- won_at (string) – (required) The date of victory in ISO 8601 format
-
PUT
/game-config/{name}/start
¶ Start a created game configuration selected by name.
Parameters: - name (string) –
Status Codes: - 200 OK – The game is started
- 404 Not Found –
- 409 Conflict –
Response JSON Object: - duration (integer) – The game duration in minute
- remaining (integer) – (required) The remaining time in minute
- start_at (string) – (required) The starting date
- state (string) – (required) The state of game can be “ready”, “started” or “stopped”
- team (string) – (required) The name of team
- team_members[].difficulty (any) – The difficulty of set of puzzle.
- team_members[].level (integer) – The starting level
- team_members[].level_max (integer) – The last level.
- team_members[].name (string) – (required) The name of the team member
- team_members[].theme (string) – The theme of set of puzzle. It will be randomly chosen if is it not set by the user.
- won_at (string) – (required) The date of victory in ISO 8601 format