Concepts
team_id and player_id
Stable ids for a side and for a person, shared by /teams, /players and every event's competitors.
team_id
A team_id names one side: <sport>:<slug>. The slug is the side's canonical name, lowercased, with every run of non-alphanumeric characters replaced by _. It is the same spelling the event_id is built from.
aussie_rules:carlton_blues
american_football:miami_dolphins
tennis:kei_yau_cheung_suzuna_oigawa (a doubles pair)It is scoped to the sport, not the competition: a club with the same name in the EPL and the Champions League is one team_id. In player sports (tennis, MMA, darts) the “team” is the player or pair.
player_id
A player_id is <roster>:<source>:<source_id>, for example nfl:espn:4429435. It is one row per person per roster: a footballer in the EPL and in the Champions League has an epl: and a ucl: id.
Rules
- Both are stable: store them as join keys.
- Get a
team_idfrom /teams or from an event'scompetitors[].id; get aplayer_idfrom /players. - Pass a
team_idasteam=on/playersto list a squad. - They name a side and a person, not a bet: a selection is still identified by selection_key.