Liveblog Sports Event
Sport liveblogs have special data structures to:
- display events like goals, penalties, etc.
- connect those events to teams and players
- display the time of play the event occurred
This page documents the structure both for writing sport events through the API and for reading them, e.g. when rendering a liveblog with your own frontend instead of the Tickaroo web embed.
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 involved in this event
"players": [],
// Optional: The Game Phase to display
"phase": {
"_type": "Tik::Model::Content::SportPhase",
// Full display name, for example "2nd Half"
"name": "",
// Optional: short display name for constrained layouts, for example "HT2"
"short_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": "",
// Optional: true if the event was revoked after the fact,
// for example a goal overturned by video review.
// Renderers should display the event as cancelled (e.g. struck through),
// not hide it.
"is_cancelled": false
}
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. 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
Note for renderers: in real liveblogs — especially games imported from external data providers — a SportEventContentBlock can arrive without an event_type, carrying only time_of_play (and possibly phase). Your renderer must tolerate such blocks; the Tickaroo web embed shows the time of play and renders no event body in that case.
Adding the team
While the actual team object has more fields, only the following are used when writing events:
"team": {
"_type": "Tik::Model::Team",
// The id of the team, if it already exists
"_id": "",
// The display name of the team
"name": ""
}
When reading events, the embedded team typically carries additional fields, e.g.:
"team": {
"_type": "Tik::Model::Team",
"local_id": "",
"name": "Spanien",
// Optional: short display name for constrained layouts
"short_name": "",
// Optional: team logo, see "Displaying player and team images" below
"image": "",
"sportstype": "soccer"
}
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": {}
}
event_player_type vs event_player_title
The two fields serve different purposes:
event_player_typeis the stable, locale-independent key. Use it in your renderer for icons, styling and grouping — it is always one of the values in the table below, regardless of the liveblog’s language.event_player_titleis the display label, already localized in the liveblog’s locale. Display it as-is; do not translate the type yourself.
For example, a goal in a German-language liveblog contains:
{
"_type": "Tik::Model::Content::SportEventPlayer",
"event_player_type": "scorer",
"event_player_title": "Torschütze",
"player": { ... }
}
Player involvement types
These are all event_player_type values that can occur. Which types are used by which event is listed in Appendix B.
| ID | Involvement |
|---|---|
scorer |
Scored the goal / points |
assist |
Assisted the score |
shooter |
Took the shot or attempt (e.g. a missed free throw, a saved shot) |
keeper |
Goalkeeper involved in the event (e.g. made the save) |
injured |
Player who got injured |
offender |
Committed the foul, penalty or turnover |
in |
Substituted into the game |
out |
Substituted out of the game |
rider |
Rider involved (cycling events) |
driver |
Driver involved (motorsports events) |
up |
Competitor who gained the position in an overtake |
down |
Competitor who lost the position in an overtake |
leader |
New leader after a lead change |
second |
Competitor now running second after a lead change |
Player fields when reading events
When reading events, each embedded player is a full Tik::Model::Player. All fields, their units and notes for displaying them are documented in the Player API Documentation.
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.
Displaying player and team images
The image field of players and teams contains one of two kinds of references:
- an absolute HTTPS URL (typical for games imported from external sports data providers) — can be used directly, e.g.
"https://s.hs-data.com/gfx/person/cropped/250x250/475490.png" - an
imageservice://URI (Tickaroo-managed players and teams) — not directly fetchable, e.g."imageservice://media/organization/…/player/…/image/….png"
To display (and resize or crop) an imageservice:// URI, use the Tickaroo Image Service documented in the Media Documentation. The Image Service also accepts HTTPS URLs, so you can route all images through it for uniform sizing.
Appendix A: Sportstype Table
| ID | Name | Release Stage |
|---|---|---|
american_football |
American Football | released |
basketball |
Basketball | released |
cycling |
Cycling | released |
cyclocross |
Cyclocross | released |
gaelic_sports |
Gaelic Games | released |
icehockey |
Ice Hockey | released |
handball |
Handball | released |
motorsports |
Motorsports | released |
news |
News | released |
rugby_union |
Rugby | released |
soccer |
Soccer | released |
tennis |
Tennis | released |
Appendix B: Event Types Table
american_football
| ID | Name | Has Team | Has Player Types |
|---|---|---|---|
american_football.start |
Start | no | |
american_football.pause-quarters |
Break | no | |
american_football.resume-quarters |
Resume Break | no | |
american_football.end-of-regular-play |
End of Regular Play | no | |
american_football.start-overtime |
Overtime Start | no | |
american_football.pause-overtime |
Overtime Break | no | |
american_football.resume-overtime |
Resume Overtime | no | |
american_football.end-of-overtime |
Overtime End | 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 |
american_football.touchback |
Touchback | yes | |
american_football.injury-timeout |
Injury Timeout | yes | injured |
basketball
| ID | Name | Has Team | Has Player Types |
|---|---|---|---|
basketball.points-two |
2 Pt. | yes | scorerassist |
basketball.points-three |
3 Pt. | yes | scorerassist |
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 |
cycling.give-up |
Withdrawal | 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 |
cyclocross.give-up |
Withdrawal | 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 |
Extra Time Start | no | |
gaelic_sports.pause-overtime |
Extra Time Break | no | |
gaelic_sports.resume-overtime |
Resume Extra Time | no | |
gaelic_sports.end-of-overtime |
End of Extra Time | no | |
gaelic_sports.end |
End | no | |
gaelic_sports.point |
Point | yes | scorerassist |
gaelic_sports.two-point |
Two Points | yes | scorerassist |
gaelic_sports.goal |
Goal | yes | scorerassist |
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 | outin |
icehockey
| ID | Name | Has Team | Has Player Types |
|---|---|---|---|
icehockey.goal |
Goal | yes | scorerassist |
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 | scorerassist |
handball.parry |
Save | yes | keepershooter |
handball.seven-meter |
7 Meter | yes | shooterkeeper |
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 | inout |
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 |
Extra Time Start | no | |
handball.pause-overtime |
Extra Time Break | no | |
handball.resume-overtime |
Resume Extra Time | no | |
handball.end-of-overtime |
Extra Time End | no | |
handball.start-shootout |
Penalty Shootout | no | |
handball.end |
End | no |
motorsports
| ID | Name | Has Team | Has Player Types |
|---|---|---|---|
motorsports.start |
Start | no | |
motorsports.end |
Finish | no | |
motorsports.crash |
Crash | no | driver |
motorsports.pit-stop |
Pit Stop | no | driver |
motorsports.lead-change |
Lead Change | no | leadersecond |
motorsports.overtake |
Pass | no | updown |
motorsports.safety-car |
Safety Car | no | |
motorsports.virtual-safety-car |
Virtual Safety Car | no | |
motorsports.yellow-flag |
Yellow Flag | no | |
motorsports.red-flag |
Red Flag | no | |
motorsports.under-investigation |
Under Investigation | no | driver |
motorsports.penalty |
Penalty | no | driver |
motorsports.fastest-lap |
Fastest Lap | no | driver |
motorsports.team-radio |
Team Radio | no | driver |
motorsports.weather-info |
Weather Info | no | |
motorsports.location |
Location | no | |
motorsports.podium |
Podium | no | driver |
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 | inout |
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 |
Extra Time Start | no | |
soccer.pause-overtime |
Extra Time Break | no | |
soccer.resume-overtime |
2nd Extra Time | no | |
soccer.end-of-overtime |
Extra Time End | no | |
soccer.start-shootout |
Penalty Shootout | no | |
soccer.end |
End | no | |
soccer.goal |
Goal | yes | scorerassist |
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 | outin |
soccer.goal-opportunity |
Scoring Chance | yes | offender |
soccer.free-kick |
Free Kick | yes | shooter |
soccer.penalty-kick |
Penalty | yes | shooterkeeper |
soccer.penalty-kick-missed |
Penalty miss | yes | shooterkeeper |
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 |