Skip to main content

Implementing Scoreboard Feeds

Introduction

To display a list of games within a scoreboard component, you'll need to create a feed of entries, each one pointing to a specific game. In the following guide, we will explain the available options for presenting the scoreboard cell.

The Structure of a Feed

A JSON Feed should contain a list of games. A JSON Feed begins with some information at the top, indicating its source and optionally including a title, among other details. Following that, there is an array of objects (entry) that provide descriptions for each item in the list.

Example of a feed

{
"id": "560e97d0-bbbf-496e-8b9b-ac363d311167",
"type": {
"value": "feed"
},
"title": "Game List",
"entry": [
{
"type": {
"value": "gameByTeam-page"
},
"id": "11678",
"title": "משחקי הכנה",
"summary": "משחקי הכנה",
"author": {
"name": ""
},
"link": {
"href": "",
"type": "link"
},
"media_group": [
{
"type": "image",
"media_item": [
{
"src": "",
"key": "image_base",
"type": "image"
}
]
}
],
"extensions": {
"game_date_txt": "10/09/2022",
"year_id": "2023",
"team1": "1924",
"team1_name": "וילרבאן",
"team1_pic": "https://maccabi.co.il/mtpic/2019-20/Logos/asvel.png",
"team2": "1923",
"team2_name": "מכבי Playtika תל אביב",
"team2_pic": "https://maccabi.co.il/Images/logo_maccabi.png",
"score_team1": "86",
"score_team2": "82",
"BOARD_ID": "39",
"gameNumber": "1",
"TimeOfGame": "15:00",
"PlaceOfGameHeb": "היכל קרפנטייה",
"tickets_url": "",
"ExternalID": "0",
"matchStatus": 1,
"liveData": {
"period": "1",
"minutes": "9",
"seconds": "23",
"score_team1": "86",
"score_team2": "82",
"is_game_finished": false
},
"period_info_txt": "Quarter 1 / 09:23",
"button1_params": {
"type": {
"value": "link"
},
"link": {
"rel": "alternate",
"href": "https://maccabi.co.il/GameZone.asp?GameId=11678#!preview"
}
},
"button2_params": {
"type": {
"value": "link"
},
"link": {
"rel": "alternate",
"href": "http://maccabi.co.il/tickets-2.asp"
}
}
}
}
]
}

Fields

id

(required, string) A unique id for the feed.

title

(optional, string) is plain text. The title of the feed, used as the component header in the app.

type

(required, object) Should always be set to

"type": {
"value": "feed"
}

entry

(required, array) Holds the list feed items. See below all the entry item required and optional fields.

Game Entry Example

The scoreboard component is capable of displaying a list of statistics, dates, and times for past, live, or future matches. We offer the option to add two buttons to each game, and the text on these buttons is customizable. These buttons are designed to navigate to another screen, and you can also configure this behavior differently for each game.

As mentioned earlier, each entry points to a specific game. In the following example, we provide an illustration of an entry JSON object:

{
"type": {
"value": "gameByTeam-page"
},
"id": "11678",
"title": "משחקי הכנה",
"summary": "משחקי הכנה",
"author": {
"name": ""
},
"link": {
"href": "",
"type": "link"
},
"media_group": [
{
"type": "image",
"media_item": [
{
"src": "",
"key": "image_base",
"type": "image"
}
]
}
],
"extensions": {
"game_date_txt": "10/09/2022",
"year_id": "2023",
"team1": "1924",
"team1_name": "וילרבאן",
"team1_pic": "https://maccabi.co.il/mtpic/2019-20/Logos/asvel.png",
"team2": "1923",
"team2_name": "מכבי Playtika תל אביב",
"team2_pic": "https://maccabi.co.il/Images/logo_maccabi.png",
"score_team1": "86",
"score_team2": "82",
"BOARD_ID": "39",
"gameNumber": "1",
"TimeOfGame": "15:00",
"PlaceOfGameHeb": "היכל קרפנטייה",
"tickets_url": "",
"ExternalID": "0",
"matchStatus": 1,
"liveData": {
"period": "1",
"minutes": "9",
"seconds": "23",
"score_team1": "86",
"score_team2": "82",
"is_game_finished": false
},
"period_info_txt": "Quarter 1 / 09:23",
"button1_params": {
"type": {
"value": "link"
},
"link": {
"rel": "alternate",
"href": "https://maccabi.co.il/GameZone.asp?GameId=11678#!preview"
}
},
"button2_params": {
"type": {
"value": "link"
},
"link": {
"rel": "alternate",
"href": "http://maccabi.co.il/tickets-2.asp"
}
}
}
}

Mandatory params for a scoreboard entry

.

Fields

entry.title

(required, string) the main title of the game in string format.

entry.extensions.team1_name

(optional, string) Team 1 name in string format.

entry.extensions.team2_name

(optional, string) Team 2 name in string format.

entry.extensions.team1_pic

(required, string) A valid URL pointing to a PNG icon of team 1.

entry.extensions.team2_pic

(required, string) A valid URL pointing to a PNG icon of team 2.

entry.extensions.timeOfGame

(required, string) The time the game starts in the string format HH:MM.

entry.extensions.placeOfGame

(required, string) The location where the game is being played.

entry.extensions.game_date_txt

(required, string) The date of the game in date string format DD/MM/YYYY.

entry.extensions.matchStatus

(required, integer) There are three game statuses:

  • MATCH_STATUS_PAST = 1
  • MATCH_STATUS_FUTURE = 2
  • MATCH_STATUS_LIVE = 3

entry.extensions.period_info_txt

(optional, string) The current live time of the game that will be presented.

entry.extensions.score_team1

(optional, string) The current score of team 1.

entry.extensions.score_team2

(optional, string) The current score of team 2.

entry.extensions.button1_params

(optional, object) Button 1 configurations.

entry.extensions.button1_params.isEnabled

(required, boolean) Determines whether the button is displayed. When set to "true," the button will be shown; when set to "false," it will be hidden.

entry.extensions.button1_params.type.value

(required, string) Opens the screen mapped to the type.value type in Zapp studio.

(required, string) According to the Applicaster JSON Feed Protocol, the link object should be included in the original feed to provide additional information about the entry. This can include information such as the entry's canonical URL or a URL to access the entry's metadata.

entry.extensions.button2_params

(optional, object) Button 2 configurations.

entry.extensions.button2_params.isEnabled

(required, boolean) Determines whether the button is displayed. When set to "true," the button will be shown; when set to "false," it will be hidden.

entry.extensions.button2_params.type.value

(required, string) Opens the screen mapped to the type.value type in Zapp studio.

(required, string) According to the Applicaster JSON Feed Protocol, the link object should be included in the original feed to provide additional information about the entry. This can include information such as the entry's canonical URL or a URL to access the entry's metadata.