Game information

Terminology:

In all requests {game} refers to the appropriate game name.

Each game may have its own requests, but room and session requests are shared between all games.

List of games

Get a list of games. The game tag is what should be used in all requests which require a game. The name is for display to the user.

Request:

GET games

Response:

[
    {
        "tag": "noughts",
        "name": "Noughts"
        "minPlayers": 2,
        "maxPlayers": 2
    },
    ...
]

Save/load user-data

Some games support saving user-data. User-data is comprised of a set of key-value pairs which are stored on the server and associated to a particular user.

Any game which supports user-data must validate any data which a client attempts to save.

The key must match [a-zA-Z0-9_-]+ and be between 1 and 32 characters long.

Request:

GET games/{game}/user-data/{user-id}/{key}
PUT games/{game}/user-data/{user-id}/{key}

Response:

For a GET, the response body contains the value of the data if it exists. For a PUT, a 204 No Content is expected.

Possible errors: