-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
The API should allow consumers to POST
to /ladder/:game/game
to reserve a gameId in which stats can be posted to at a later time. Ideally, this should be called only once by the "Host" when they start any game.
The "Host" client can then communicate the "gameId" (from response) to all players within the game.
Example Request
POST /ladder/yr/game HTTP 1.1
Authorization: Basic <hash>
{
"players": [{
"nam": "Wingle"
}],
"settings": {
"sped": 0,
"scen": "Some Map",
"unit": 1,
"aipl": 0,
"crat": 1,
"base": 1,
"supr": 0,
"shrt": 0,
"cred": 10000,
"trny": 1
}
}
Example Successful Response
Request Method: POST
Status Code: 201 Created
{
"gameId": 1,
"url": "/ladder/yr/game/1"
}