Games

Game state (from the game)

POST/api/gsi/{game}
Game token. Open, but the body must carry the game's token (auth.token, from its config file).

Where the games post their state. Open, but only with the token from the game's config file (auth.token). At most 40 a second; 30 wrong tokens in a minute block it for a minute.

Path parameters

gamestringrequired

cs2 or dota2.

Request body application/json

object

Valve game-state integration JSON, with auth.token.

Responses

200OKapplication/json
okboolean
offboolean

The game is turned off in Tempolight.

403Locked, or not allowed.application/json
errorstringrequired

What went wrong, in a sentence for people.

404No such id.application/json
errorstringrequired

What went wrong, in a sentence for people.

429Too many calls; wait a little.application/json
errorstringrequired

What went wrong, in a sentence for people.

Request
curl -X POST 'http://localhost:8080/api/gsi/cs2' \
  -H 'content-type: application/json' \
  -d '{
  "provider": {
    "name": "Counter-Strike 2"
  },
  "player": {
    "state": {
      "health": 100,
      "flashed": 0
    }
  },
  "auth": {
    "token": "9f8e7d6c5b4a39281706f5e4d3c2b1a0"
  }
}'
Response
{
  "ok": true
}
Edit on GitHub