POST /lobbies
GET /lobbies/:id
POST /lobbies/:id/players
POST /games
GET /games/:id
POST /games/:id/players
GET /games/:id/state
PATCH /games/:id/state
Create a lobby
Response
{
"id": "uuid"
}
Join lobby
Request
{
"playerName": "string"
}
Response
{
"playerId": "uuid"
}
Response
{
"id": "uuid",
"name": "string",
"currentGameId": "uuid",
"players": {
<playerId>: {
"id": "uuid",
"name": "string",
"score": "integer"
}, {...}
},
"gamesPlayed": ["uuid"]
}
Starts a new game
Request
{
"playerId": "uuid",
"lobbyId": "uuid"
}
Response
{
"id": "uuid"
}
Response
{
"id": "uuid",
"lobbyId": "uuid",
"playerX": "uuid",
"playerO": "uuid",
"startDate": "datetime"
}
Request
{
"playerId": "uuid"
}
Response
{
"id": "uuid",
"controller": "uuid", // playerId of person whose turn it is
"concluded": "boolean",
"winner": "uuid",
"board": [
["", "", ""],
["", "", ""],
["", "", ""]
]
}
Update player moves