Widget Docs
Coverage MatrixDocumentationChange LogLog InContact Us
Widget Docs

Season Scores

us.season.scores displays scoreboard information broken down by a day or a round (according to local time).

For the widget to render you must provide a valid uniqueTournamentId or seasonId. All other properties are optional.

Important to note when using this widget:

  1. The combination of properties matters.
  2. seasonId has priority over uniqueTournamentId.
  3. uniqueTournamentId alone denotes the nearest play day / round of the active season to a current day or a current round.
  4. If seasonId is entered the unique tournament is derived from that season, not the input for uniqueTournamentId.
  5. seasonId alone denotes the nearest play day / round of the season to a current day or a current round. For older seasons it is always the last play day/last round of the season.
  6. numFutureDays extends the scores list into the future (i.e. numFutureDays are shown); defaults to 2; this only works in the middle of the season.
  7. selectedDate and selectedIdx enables selection of a particular day or round. tableroundId and cuproundId enables selection of a particular round by precise table/cup round id (advanced use). These options work for all seasons.
  8. "round by round" is a property of a tournament; by default all "round by round" tournaments are broken down by round, unless isRoundByRound is set to false; then they are broken down by day.
  9. The widget will automatically flip to the next day (when broken down by a day during auto-selecting mode), unless dayFlipUTCHours or dayFlipHoursBefore are set.
  10. A Score widget is used to render a single game. Scope of the displayed information depends on the sport and/or unique tournament. Score widgets feature links for navigating to other widgets/content.
  11. Clickable items are teams, players (i.e. team leaders) and links.

Example: To display five days of scores broken down by day, in the middle of a season: set seasonId, selectedData and numFutureDays to 5. If a tournament is 'round by round' you can also set isRoundByRound to false.

Parameters

Name Type Argument Default Description
seasonId number Season ID
uniqueTournamentId number Unique Tournament ID
numFutureDays number optional 2 Extends the scores list into the future.
selectedDate string optional Selected date in YYYY-MM-DD format.
selectedIdx number optional Selects particular day/round.
isRoundByRound boolean optional 'true' If false it forces breaking down by day even if the tournament is typically 'round by round'. However, true breaks down by round only 'round by round' tournaments.
tableroundId number optional Matches round by particular table round id.
cuproundId number optional Matches round by particular cup round id.
dayFlipUTCHours number (integer between 0 and 23.) optional Forces flipping to current day's games at a specified time based on UTC time zone, but not before start of the current day (in local time). Although the time is set according to UTC, it will effect end users according to their local time zone. Example: if the current date is 1/19/22, a value of 20 will set flipping at 12:00 for a user in PST time zone, 15:00 for EST and 21:00 for CET. However, using a value of 6 will set flipping at 0:00 PST (rather than 1/18/22 22:00 PST), 1:00 EST and 7:00 CET. An integer between 0 and 23. dayFlipUTCHours has priority over dayFlipHoursBefore.
dayFlipHoursBefore number (integer between 0 and 23.) optional Forces flipping to current day's games a specific number of hours before scheduled time of the first match, but not before start of the current day (in local time). Example: if the first game of the day is at 7:30pm EST, a value of 7 would leave last night's games displayed until 12:30pm EST. An integer between 0 and 23.
showOdds boolean optional 'true' If false odds for all pre-gamees visualizations are hidden.
disableGameHeader boolean optional If true hides the game header.
disableDateSwitcher boolean optional If true hides the date/round switcher control.
dropdownReverese boolean optional If true reverses switcher items when in round/dropdown mode.
disableGameInfo boolean optional If true hides collapsible content (i.e. game information).
disableGameInfoXSmall boolean optional 'true' If true hides collapsible content (i.e. game information) on X-Small responsive breakpoint (<321px).
preMatchLinks string optional Comma separated string of link keys for pre-game. Valid options are: undefined, default, preview, boxscore, gametracker, recap, lineups, and matchstats. Entering default is the same as entering preview.
liveMatchLinks string optional Comma separated string of link keys for live games. Can be undefined, default, preview, boxscore, gametracker, recap, lineups, matchstats. Entering default is the same as entering 'boxscore, gametracker'.
postMatchLinks string optional Comma separated string of link keys for post-game. Can be undefined, default, preview, boxscore, gametracker, recap, lineups, matchstats. Entering default is the same as entering 'boxscore, recap'.
border boolean optional If true enables a border around the widget.
onItemClick function optional Function/event handler. By default, the widget has two click target areas: team and player. The player targets appear in the Game Information section, depending on game status. With preMatchLinks, liveMatchLinks and/or postMatchLinks set, the Score widget can get additional targets: preview, boxscore, gametracker, recap, lineups, matchstats links. All targets emit the following match props on click or touch: matchId, sportId, realCategoryId, seasonId, tournamentId, uniqueTournamentId, awayTeamUid, homeTeamUid, matchStatus. Team target adds uniqueTeamId, player target adds playerId. Valid matchStatus values are: pre, live, post.

Examples

<div class="sr-widget" data-sr-widget="us.season.scores" data-sr-season-id="89613"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader" data-sr-language="en_us" async></script>

<script>
    (function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
    g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
    )})(window,document,"script","https://widgets.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.season.scores', {seasonId: 89613, selectedDate: '2022-02-15'});
</script>
<div id="sr-widget"></div>

<script>
    (function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
    g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
    )})(window,document,"script","https://widgets.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.season.scores', {seasonId: 89613, numFutureDays: '5', preMatchLinks: 'default', liveMatchLinks: 'default', postMatchLinks: 'default', onItemClick: function(type, obj){alert(type + ': ' + JSON.stringify(obj));}});
</script>
<div id="sr-widget"></div>

"team",{"matchId":23361061,"seasonId":77361,"tournamentId":36,"uniqueTournamentId":8,"realCategoryId":32,"sportId":1,"awayTeamUid":2836,"homeTeamUid":2831,"matchStatus":"post","uniqueTeamId":2836}

"player",{"matchId":27543026,"matchStatus":"pre","playerId":36476,"seasonId":78917,"tournamentId":10560,"uniqueTournamentId":234,"realCategoryId":37,"sportId":4,"awayTeamUid":3703,"homeTeamUid":3677}

"box_score",{"matchId":23361061,"seasonId":77361,"tournamentId":36,"uniqueTournamentId":8,"realCategoryId":32,"sportId":1,"awayTeamUid":2836,"homeTeamUid":2831,"matchStatus":"post"}