Content Blocks
The Editor V2 creates liveblog entries as an array of content block. Each block has at least the following fields:
_type: indicating what kind of content block it is.local_id: a unique id of the content block
Tik::Model::Content::RichTextContentBlock
Displays a block of HTML.
{
"_type": "Tik::Model::Content::RichTextContentBlock",
"local_id": "",
// HTML Formated rich text
"text": ""
}
We only allow a specific subset of HTML Tags, all other tags will be stripped out!
<!-- target and rel will be added automatically! -->
<a href="" target="_blank" rel="nofollow">...</a>
<blockquote>...</blockquote>
<b>...</b>
<strong>...</strong>
<i>...</i>
<em>...</em>
<u>...</u>
<strike>...</strike>
<s>...</s>
<del>...</del>
<h1>...</h1>
<h2>...</h2>
<h3>...</h3>
<h4>...</h4>
<h5>...</h5>
<ul>...</ul>
<ol>...</ol>
<li>...</li>
<div>...</div>
<span>...</span>
<p>...</p>
<br>
<table>
<caption>...</caption>
<thead><tr><th>...</th></tr></thead>
<tbody><tr><td>...</td></tr></tbody>
<tfoot><tr><td>...</td></tr></tfoot>
</table>
Tik::Model::Content::MultiMediaContentBlock
Displays one or more pictures/videos. For more details about the data structure refer to the Media Documentation.
{
"_type": "Tik::Model::Content::MultiMediaContentBlock",
"local_id": "",
// List of media items to display
"items": []
// Either "slideshow" or "default", if null or empty string "default" is used
"display_type": ""
}
Tik::Model::Content::AnimatedImageContentBlock
Displays one animated GIF or animated WebP, played as it is: no crop, no resizing, no slideshow. The item references the media array exactly like an item of a MultiMediaContentBlock (see the Media Documentation); its transform and link_url are ignored. Show the referenced media at its natural size, scaled down to fit, and fall back to a still frame where animations cannot be shown.
{
"_type": "Tik::Model::Content::AnimatedImageContentBlock",
"local_id": "",
// Tik::Model::Content::ImageMediaContent, required
// The animation to display (media_local_id, title, credit, content_warning)
"item": {}
}
Tik::Model::Content::WebEmbedContentBlock
Displays either a rich link or an embed (depending on target and consent settings)
{
"_type": "Tik::Model::Content::WebEmbedContentBlock",
"local_id": "",
// The URL or Embed Code the of the target
"url": ""
// Contains information obtained by oembed lookups (plus tickaroo proprietary additions)
"oembed_json": ""
}
Tik::Model::Content::QuoteContentBlock
Special way to display an author and quote
{
"_type": "Tik::Model::Content::QuoteContentBlock",
"local_id": "",
// Plain text quote
"text": ""
// Plain text author name
"author": ""
// if set, author will link to this URL
"source": ""
}
Tik::Model::Content::EmojiContentBlock
Displays a big emoji followed by rich text HTML.
{
"_type": "Tik::Model::Content::EmojiContentBlock",
"local_id": "",
// The UTF code of the emoji to display
"emoji": "",
// HTML formatted rich text
"title": ""
}
Tik::Model::Content::PlayerCardContentBlock
Displays a card showcasing a single player: photo, name, description and a fact list (position, number, in team since, nationality, birthday, weight, height), plus social media links.
{
"_type": "Tik::Model::Content::PlayerCardContentBlock",
"local_id": "",
// The player to display
"player": {
"_type": "Tik::Model::Player",
"_id": "",
"name": "",
// Player photo: an HTTPS URL or an imageservice:// URI,
// see the Image Service section of the Media Documentation
"image": "",
// Free-text description shown below the name
"about": "",
"birthdate": 132456789,
"gender": "m",
// Shirt number (string, can contain text)
"number": "",
"position": "",
// Unix timestamp in seconds
"team_member_since": 123456789,
// Uppercase ISO 3166-1 alpha-2 code, displayed as the localized country name
"country": "ES",
// Weight in grams (displayed as kg)
"weight": 77000,
// Height in centimeters
"height": 184,
// Social media links
"facebook": "",
"twitter": "",
"instagram": ""
}
}
All player fields except name are optional; the card only renders the facts that are set. See the Player API Documentation for the full model, field units and the known position values.
Tik::Model::Content::SportEventContentBlock
Displays a sport event (goal, penalty, etc.) inline with other content. For more details about the data structure refer to the Sport Event Documentation.
{
"_type": "Tik::Model::Content::SportEventContentBlock",
"local_id": "",
"sportstype": "",
"event_type": "",
"title": "",
"team": {},
"players": [],
"phase": {},
"time_of_play": "",
"is_cancelled": false
}
Tik::Model::Content::ScoreboardContentBlock
Displays a scoreboard within your liveblog. For details about the scoreboard structure refer to the Scoreboard Documentation.
{
"_type": "Tik::Model::Content::ScoreboardContentBlock",
"local_id": "",
// The scoreboard to display
"scoreboard": {}
}
Tik::Model::Content::PollContentBlock
Displays a poll within your liveblog
{
"_type": "Tik::Model::Content::PollContentBlock",
"local_id": "",
// Unix timestamp in seconds when the poll closes
"closes_at": 123456789,
// Question Text:
"question": "",
// Answers
"answers": [
{
"_type": "Tik::Model::Content::PollAnswerContent",
"local_id": "",
"text": ""
}
]
}
Tik::Model::Content::QuizContentBlock
Displays a multiple-choice quiz. Unlike a poll, each question has a correct answer, revealed after the reader picks one.
{
"_type": "Tik::Model::Content::QuizContentBlock",
"local_id": "",
"questions": [
{
"_type": "Tik::Model::Content::MultipleChoiceSingleAnswerQuizQuestionContent",
"local_id": "",
// Question text
"question": "",
// Optional: image displayed with the question
"image": {},
// Answer options
"answers": [
{
"_type": "Tik::Model::Content::QuizAnswerContent",
"local_id": "",
"text": ""
}
],
// local_id of the correct answer in "answers"
"correct_answer_local_id": "",
// Optional: explanation shown after answering
"answer_details": "",
// Optional: URL for further reading, shown with the explanation
"info_link": ""
}
]
}
Tik::Model::Content::LinkedEventsContentBlock
A list of links to other events of the same liveblog (“Linked messages” in the editor). Each entry
stores the linked event’s local_id plus a snapshot of its time and text, so a client can render the
entry even when the linked event is not part of the current response. When the linked event is
loaded, prefer its current data over the snapshot.
headline and items[].text are plain text, stored exactly as sent: markup is not removed and
entities are not decoded, so a value can legitimately contain characters such as <, > or &.
Escape both fields for the output context before inserting them into HTML (or XML, or any other
markup); never insert them as raw HTML.
The Tickaroo editor creates at most one LinkedEventsContentBlock per event. The API accepts
several, and the Tickaroo embed renders each of them as its own list.
On save, entries without an event_local_id,
duplicates within one block and links to the event itself are removed; text is cut to at most 500
characters on a word boundary. A linked event may have been deleted since it was linked, so a client
must handle entries whose event no longer exists.
{
"_type": "Tik::Model::Content::LinkedEventsContentBlock",
"local_id": "",
// Optional: plain text headline (escape before inserting into HTML); no header is shown when empty
"headline": "",
// Ordered entries
"items": [
{
"_type": "Tik::Model::Content::LinkedEventContent",
// local_id of the linked event
"event_local_id": "",
// Snapshot: created_at of the linked event (unix timestamp, seconds)
"created_at": 0,
// Snapshot: plain text of the linked event, at most 500 characters (escape before inserting into HTML)
"text": ""
}
]
}