Games
Change a game
PATCH
/api/integrations/games/{game}Admin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Lights that react to the game: health, flashbangs, the bomb, kills, rounds (CS2), mana, Roshan, day and night (Dota 2). Targets are all, off, zone:<id> or dev:<id>.
Path parameters
gamestringrequiredcs2 or dota2.
Request body application/json
enabledbooleanTurning it on makes its token.
intensitynumber0 to 1modestringOne of
"blend" "takeover"healthTargetstringeffectsTargetstringmanaTargetstringambientTargetstringkillsbooleanflashbangbooleanbombbooleanroundsbooleanroshanbooleandaynightbooleanResponses
200OKapplication/json
enabledbooleantokenstringintensitynumber0 to 1modestringOne of
"blend" "takeover"namestringfilestringfolderstringstatusobjectLive game status.
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
404No such id.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X PATCH 'http://localhost:8080/api/integrations/games/cs2' \
-H 'content-type: application/json' \
-d '{
"enabled": true,
"intensity": 0.8,
"mode": "blend"
}'const res = await fetch("http://localhost:8080/api/integrations/games/cs2", {
method: "PATCH",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"enabled": true,
"intensity": 0.8,
"mode": "blend"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.patch(
"http://localhost:8080/api/integrations/games/cs2",
json={
"enabled": True,
"intensity": 0.8,
"mode": "blend"
},
)
print(res.json())Response
{
"enabled": true,
"token": "string",
"intensity": 0,
"mode": "blend",
"name": "string",
"file": "string",
"folder": "string",
"status": {}
}{
"error": "mode is blend or takeover"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "Unknown game \"x\" (cs2 or dota2)"
}