Tornado server used for distributing live results from matches - all database changes are performed via Django models of MINICUP defined in litovel-minicup-model
package.
{
id: 42,
half_index: 1, // 0/1 for first/second half
time_offset: 38, // seconds after start of current half
message: "Player one scored",
score: [12, 10],
type: "goal", // one of start,goald,end,info
team_index: 1, // -1 if not related to team
absolute_time: 1447585410450, // standard unix timestamp
match_id: 368,
team_id: 25, // null if not related
// null if not related to player
player_id: 85,
player_name: "Son Hai Nguyen",
player_number: 25,
}
{
id: 42,
name: "Son Hai Nguyen",
number: 68,
firstname: "Son",
lastname: "Hai Nguyen"
}
{
id: 42,
trainer_name: "Son Hai Nguyen",
name: "Team Foo",
dress_color: "red",
}
Returns all categories with unconfirmed matches.
{
categories: [
{id: 42, name: "Mladší"},
...
]
}
Returns all unconfirmed matches in category (in case of non existing unconfirmed returns all matches in category).
{
matches: [
{
id: 42,
name: "A vs. B",
date: "15:00 1.1.2020",
location: "A",
state: "init", // one of [init, half_first, pause, half_second, end]
},
...
]
}
Returns player rosters for match.
{
home_team_players: [Player, ...],
away_team_players: [Player, ...],
}
Returns all events for match, sorted asc by time.
{
events: [MatchEvent, MatchEvent, ...]
}
Returns more details for team.
{
**Team,
points: 25,
order: 1,
scored: 25,
received: 85,
description: "Team trained by ..., good pre-season results....",
players: [{**Player, total_goals: 25}, ...],
matches: [Match, Match, ....]
}