Liveblog Sports Event

Sport liveblogs have special data structures to:

  • display events like goals, penalties, etc.
  • connect those events to teams and plays
  • display the time of play the event occured

SportEventContentBlock

To describe all those purposes, the sport_event field of an Event must be filled with a Tik::Model::Content::SportEventContentBlock object.

"sport_event": {
  "_type": "Tik::Model::Content::SportEventContentBlock",
  // ID of the content block
  // since there is only one sport_event per event it can be any value
  "local_id": "",
  
  // the sportstype this event is for (soccer, icehockey)
  "sportstype": "",
  
  // the event type that happened 
  "event_type": "",
  
  // Optional: a title displayed along the event
  "title": "",
  
  // Optional: the team this event refers to
  "team": {},
  
  // Optional: Tik::Model::Content::SportEventPlayer[] 
  // players invovled in this event
  "players": [],

  // Optional: The Game Phase to display
  "phase": {
    "_type": "Tik::Model::Content::SportPhase"
    "name": ""
  }

  // Optional: text to display representing the current time or game phase 
  // for example "32'" to signify 32. Minute of the game
  "time_of_play": "",
}

Specifying sportstype and event_type

The sportstype must be set to a valid sports type (Appendix A).

The event type must be set to a valid event type (Appendix B), for all types are listed at the end of this document. The specified event_type will in most cases match the sportstype, but in practice any event type can be used in any sports allowing for great flexibility of our templates.

Depending on the event_type, other fields can be set:

  • team: Some events allow to specify which team is affected or. Refer to the event types table to see which event allows for that.
  • players: Some events allow to specify one or multiple players involved in this event. Refer to the event types table to see which events allow players to be specified

Adding the team

While the actual team object has more fields, only the following are used for events:

"team": {
  "_type": "Tik::Model::Team",

  // The id of the team, if it already exists
  "_id": "",

  // The display name of the team
  "name": "",
}

Teams can either be precreated or added on-the-fly.

Using a predefined team

Only _type and _id need to be set

"team": {
  "_type": "Tik::Model::Team",
  "_id": ""
}

After the event object has been created, the response will contain the full team information.

For more information on creating teams before using them please refer to the Teams API Documentation.

Creating a team on the fly

Only _type and name need to be set.

"team": {
  "_type": "Tik::Model::Team",
  "name": ""
}

The team will be created with the specified name and assigned an _id. The response, after the event has been created, will contain a full team object including the new id.

Adding involved players

Players will be displayed in the order they are specified in the array. Each entry is wrapped in a Tik::Model::Content::SportEventPlayer object.

{
  "_type": "Tik::Model::Content::SportEventPlayer",

  // The type of the involvement of the player in the event (example 'scorer')
  // Valid types for each event can be found in the Appendix B Table
  "event_player_type": "",

  // Displayed type of the involvement of the player in the event (example 'Scorer')
  "event_player_title": "",

  // The actual Tik::Model::Player object
  "player": {}
}

Using a predefined player

Only _type and _id need to be set

"player": {
  "_type": "Tik::Model::Player",
  "_id": ""
}

After the event object has been created, the response will contain the full player information.

For more information on creating players before using them please refer to the Player API Documentation.

Creating a player on the fly

Only _type and name need to be set.

"player": {
  "_type": "Tik::Model::Player",
  "name": ""
}

The player will be created with the specified name and assigned an _id. The response, after the event has been created, will contain a full player object including the new id.

Appendix A: Sportstype Table

| ID | Name | Release Stage | | — | — | — | | american_football | American Football | released | | basketball | Basketball | released | | cycling | Cycling | beta | | cyclocross | Cyclocross | beta | | gaelic_sports | Gaelic Games | released | | icehockey | Icehockey | released | | handball | Handball | released | | news | News | released | | rugby_union | Rugby | released | | soccer | Soccer | released | | tennis | Tennis | beta |

Appendix B: Event Types Table

american_football

ID Name Has Team Has Player Types
american_football.start Start no  
american_football.pause-quarters   no  
american_football.resume-quarters   no  
american_football.end-of-regular-play   no  
american_football.start-overtime   no  
american_football.pause-overtime   no  
american_football.resume-overtime   no  
american_football.end-of-overtime   no  
american_football.end End no  
american_football.touchdown Touchdown yes scorer
american_football.field-goal Field Goal yes scorer
american_football.extra-point Extra Point yes scorer
american_football.two-point-conversion 2-Point Conversion yes scorer
american_football.yellow-flag Flag on the Play yes offender
american_football.red-flag Challenge Flag yes  
american_football.timeout Timeout yes  
american_football.two-minute-warning Two-Minute Warning no  
american_football.punt Punt yes  
american_football.fumble Fumble yes offender
american_football.interception Interception yes offender
american_football.turnover-on-downs Turnover On Downs yes  
american_football.safety Safety yes scorer

basketball

ID Name Has Team Has Player Types
basketball.points-two 2 Pt. yes scorer
assist
basketball.points-three 3 Pt. yes scorer
assist
basketball.free-throw-made Made Free Throw yes scorer
basketball.free-throw-missed Missed Free Throw yes shooter
basketball.throw-in Throw-in yes  
basketball.foul Foul yes offender
basketball.timeout Timeout no  
basketball.start Start no  
basketball.pause-quarters Break no  
basketball.resume-quarters Resume Break no  
basketball.end-of-regular-play End of Regular Play no  
basketball.start-overtime Overtime Start no  
basketball.pause-overtime Overtime Break no  
basketball.resume-overtime Resume Overtime no  
basketball.end-of-overtime Overtime End no  
basketball.end End no  
basketball.jumpball Jumpball yes  
basketball.time-violations Time Violations yes  

cycling

ID Name Has Team Has Player Types
cycling.start Official Start no  
cycling.start-unofficial Unofficial Start no  
cycling.end Finish no rider
cycling.intermediate-sprint Intermediate sprint no rider
cycling.feed-zone Feed Zone no  
cycling.breakaway Breakaway no rider
cycling.crash Crash no rider
cycling.mechanical-issue Mechanical Issue no rider
cycling.cobblestone Cobblestone no  
cycling.hill-climb Climb no  
cycling.mountain-climb Mountain Climb no rider
cycling.mountain-climb-c1 1st Category Climb no rider
cycling.mountain-climb-c2 2nd Category Climb no rider
cycling.mountain-climb-c3 3rd Category Climb no rider
cycling.mountain-climb-c4 4th Category Climb no rider
cycling.mountain-climb-hc Hors Catégorie no rider

cyclocross

ID Name Has Team Has Player Types
cyclocross.start Start no  
cyclocross.end Finish no rider
cyclocross.end-of-lap End Of Lap no rider
cyclocross.bike-change Bike Change no rider
cyclocross.breakaway Breakaway no rider
cyclocross.crash Crash no rider
cyclocross.mechanical-issue Mechanical Issue no rider

gaelic_sports

ID Name Has Team Has Player Types
gaelic_sports.start Start no  
gaelic_sports.pause-halves Half-time Break no  
gaelic_sports.resume-halves 2nd Half no  
gaelic_sports.end-of-regular-play End of Regular Play no  
gaelic_sports.start-overtime Overtime Start no  
gaelic_sports.pause-overtime Overtime Break no  
gaelic_sports.resume-overtime Resume Overtime no  
gaelic_sports.end-of-overtime End of Overtime no  
gaelic_sports.end End no  
gaelic_sports.point Point yes scorer
assist
gaelic_sports.goal Goal yes scorer
assist
gaelic_sports.yellow-card Yellow Card yes offender
gaelic_sports.yellow-red-card Yellow-Red Card yes offender
gaelic_sports.red-card Red Card yes offender
gaelic_sports.black-card Black Card yes offender
gaelic_sports.penalty-kick Penalty yes shooter
gaelic_sports.penalty-kick-missed Penalty Missed yes shooter
gaelic_sports.substitution Substitution yes out
in

icehockey

ID Name Has Team Has Player Types
icehockey.goal Goal yes scorer
assist
icehockey.bully Bully yes  
icehockey.timeout Timeout yes  
icehockey.penalty Penalty Shot yes shooter
icehockey.penalties Penalties yes offender
icehockey.start Start no  
icehockey.pause-periods Break no  
icehockey.resume-periods Resume Break no  
icehockey.end-of-regular-play End of Regular Play no  
icehockey.start-overtime Overtime Start no  
icehockey.pause-overtime Overtime Break no  
icehockey.resume-overtime Resume Overtime no  
icehockey.end-of-overtime Overtime End no  
icehockey.start-shootout Penalty Shootout no  
icehockey.end End no  

handball

ID Name Has Team Has Player Types
handball.goal Goal yes scorer
assist
handball.parry Save yes  
handball.seven-meter 7 Meter yes shooter
keeper
handball.turnover Turnover yes  
handball.suspension-two 2 Minutes yes offender
handball.yellow-card Yellow Card yes offender
handball.timeout Timeout no  
handball.red-card Red Card yes offender
handball.blue-card Blue Card yes offender
handball.free-throw Free Throw no  
handball.empty-goal Empty Goal yes  
handball.goalkeeper-substitution Goalkeeper Substitution yes in
out
handball.start Kickoff no  
handball.pause-halves Half-time Break no  
handball.resume-halves 2nd Half no  
handball.end-of-regular-play End of Regular Play no  
handball.start-overtime Overtime Start no  
handball.pause-overtime Overtime Break no  
handball.resume-overtime Resume Overtime no  
handball.end-of-overtime Overtime End no  
handball.start-shootout Penalty Shootout no  
handball.end End no  

rugby_union

ID Name Has Team Has Player Types
rugby_union.turnover Turnover no  
rugby_union.try Try yes scorer
rugby_union.conversion Conversion yes scorer
rugby_union.conversion-missed Conversion Missed yes shooter
rugby_union.penalty-kick Penalty yes  
rugby_union.penalty-kick-made Penalty Made yes scorer
rugby_union.penalty-kick-missed Penalty Missed yes shooter
rugby_union.penalty-try Penalty Try yes shooter
rugby_union.scrum-won Scrum yes  
rugby_union.line-out Line Out yes  
rugby_union.drop-goal Drop Goal yes scorer
rugby_union.start Start no  
rugby_union.end End no  
rugby_union.kick-off Kick Off yes  
rugby_union.substitution Substitution no in
out
rugby_union.red-card Red Card yes offender
rugby_union.yellow-card Yellow Card yes offender
rugby_union.yellow-card-re-enter Re-enter yes offender
rugby_union.tmo TMO no  

soccer

ID Name Has Team Has Player Types
soccer.start Kickoff no  
soccer.pause-halves Half-time Break no  
soccer.resume-halves 2nd Half no  
soccer.end-of-regular-play End of Regular Play no  
soccer.start-overtime Overtime Start no  
soccer.pause-overtime Overtime Break no  
soccer.resume-overtime 2nd Overtime no  
soccer.end-of-overtime Overtime End no  
soccer.start-shootout Penalty Shootout no  
soccer.end End no  
soccer.goal Goal yes scorer
assist
soccer.own-goal Own Goal yes scorer
soccer.corner Corner yes  
soccer.yellow-card Yellow Card yes offender
soccer.red-card Red Card yes offender
soccer.yellow-red-card Yellow-Red Card yes offender
soccer.substitution Substitution yes out
in
soccer.goal-opportunity Scoring Chance yes offender
soccer.free-kick Free Kick yes shooter
soccer.penalty-kick Penalty yes shooter
keeper
soccer.penalty-kick-missed Penalty miss yes shooter
keeper
soccer.video-review VAR no  
soccer.video-review-failed VAR Overturned no  
soccer.video-review-success VAR Confirmed no  

tennis

ID Name Has Team Has Player Types
tennis.start Start no  
tennis.end End no  
tennis.game-win Game yes