Betting Entertainment Tools

NBA Box Score

A match.basketball.boxScore brings printed table of statistics showing how each player performed in a game.

For the widget to render you need to provide matchId, other properties are optional.

Parameters
Name Type Attributes Default Description
props object <required>
matchId number <required>

Match ID.

disableWidgetHeader boolean false

When set to true, hides widget header.

selectedTeam string home

Shows the stats for the home or away team.

disableTeamPicker boolean false

When set to true, hides team picker.

compactMode boolean false

When set to true, switches to compact display.

defaultSorting boolean starters

Sets the column on which the widgets is initially sorted, other options are pts (points), mp (minutes played), fgm (field goals made), fga (field goals attempted), ftma (field goals made - attempted), oreb (offensive rebounds), dreb (defensive rebounds), reb (rebounds), to (turnovers), ast (assists), stl (steals), blk (blocks), ba (blocks against), pf (personal fouls), eff (efficiency)

onItemClick function

Function/event handler. Emits playerId on click or touch.

onTrack function

Function/event handler, see Tracking options.

Examples

HTML/Declarative

<div id="sr-widget" data-sr-widget="match.basketball.boxScore" data-sr-match-id="27402448"></div>
<script type="application/javascript" src="https://widgets.sir.sportradar.com/sportradar/widgetloader" async></script>

JS/Programmatic

<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.sir.sportradar.com/sportradar/widgetloader","SIR", {
        language: 'en'
    });
    SIR('addWidget', '#sr-widget', 'match.basketball.boxScore', {matchId: 27402448});
</script>

JS/Example of using Event Handler

<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.sir.sportradar.com/sportradar/widgetloader","SIR", {
        language: 'en'
    });
    SIR('addWidget', '#sr-widget', 'match.basketball.boxScore', {matchId: 27402448, onItemClick: function(type, obj){alert('playerId: ' + obj.playerId);}});
</script>
<div id="sr-widget"></div>