Strategická: Rozšíření api o počet vstupu
This commit is contained in:
parent
b6b062f2c2
commit
a734bde81d
2 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,7 @@ GET na `/api/state?game=<jmeno_hry>&token=<token>&min_round=<min_round>`
|
||||||
status: "ok"
|
status: "ok"
|
||||||
round: <int> # Kolikáté je aktuální kolo (na počátku 0)
|
round: <int> # Kolikáté je aktuální kolo (na počátku 0)
|
||||||
team_id: <int>
|
team_id: <int>
|
||||||
|
teams_count: <int>
|
||||||
time_to_response: <Optional[int]> # None v případě, že ho neznáme
|
time_to_response: <Optional[int]> # None v případě, že ho neznáme
|
||||||
state:
|
state:
|
||||||
{
|
{
|
||||||
|
|
|
@ -101,6 +101,7 @@ def api_state():
|
||||||
"status": "ok",
|
"status": "ok",
|
||||||
"round": state.round,
|
"round": state.round,
|
||||||
"team_id": team_id,
|
"team_id": team_id,
|
||||||
|
"teams_count": game.teams_count,
|
||||||
"time_to_response": time_to_end,
|
"time_to_response": time_to_end,
|
||||||
"state": game.get_logic().personalize_state(state.get_state(), team_id, state.round),
|
"state": game.get_logic().personalize_state(state.get_state(), team_id, state.round),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue