Parameters
Name |
Type |
Description |
props |
object
|
Properties
Name |
Type |
Argument |
Default |
Description |
seasonId |
number
|
<optional>
|
|
Season id. Can be of any NCAAF unique tournament ids.
|
division |
string
|
<optional>
|
|
Selected division. List of NCAA divisions/conferences
|
conference |
string
|
<optional>
|
|
Selected conference of the selected division. Applies only to regular season. Empty value means all. List of NCAA divisions/conferences
|
selectedIdx |
number
|
<optional>
|
|
Selects particular ncaaf "week" by index. Index starts with 0.
|
selectedDate |
number
|
<optional>
|
|
Selects particular ncaaf "week" that contains selectedDate.
|
roundFilteringLast |
boolean
|
<optional>
|
'false'
|
If true round switcher filtering is applied last - selected conference narrow downs round switcher available ncaaf weeks.
|
showOdds |
boolean
|
<optional>
|
'true'
|
If false hides odds for all pre-matches.
|
disableDateSwitcher |
boolean
|
<optional>
|
|
If true hides division dropdown.
|
dropdownReverse |
boolean
|
<optional>
|
|
If true it reverses switcher dropdown items.
|
disableDivisionDropdown |
boolean
|
<optional>
|
|
If true hides conference dropdown.
|
disableConferenceDropdown |
boolean
|
<optional>
|
|
If true hides round switcher control.
|
disableGameHeader |
boolean
|
<optional>
|
|
if true then headers of games are hidden.
|
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-match. Can be undefined , default , preview , boxscore , gametracker , recap , lineups . Entering default is same as entering 'preview' , with the exception of soccer - 'preview, lineups'.
|
liveMatchLinks |
string
|
<optional>
|
|
Comma separated string of link keys for live-match. Can be undefined , default , preview , boxscore , gametracker , recap , lineups . Entering default is same as entering 'boxscore, gametracker' .
|
postMatchLinks |
string
|
<optional>
|
|
Comma separated string of link keys for post-match. Can be undefined , default , preview , boxscore , gametracker , recap , lineups . Entering default is same as entering 'boxscore, recap' .
|
border |
boolean
|
<optional>
|
|
If true , draws a border around the widget.
|
onItemClick |
function
|
<optional>
|
|
Function/event handler. By default, the widget has three click target areas: team , player and filter . The player targets appear in Game information section depending on match status.
With preMatchLinks , liveMatchLinks and/or postMatchLinks set the Score widget can get additional targets: preview , boxscore , gametracker , recap 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
HTML/Declarative
<div class="sr-widget" data-sr-widget="us.season.ncaaf.scores" data-sr-season-id="46582"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/uscommon/widgetloader" data-sr-language="en_us" 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.media.sportradar.com/uscommon/widgetloader","USW", {
language: 'en_us'
});
USW('addWidget', '#sr-widget', 'us.season.ncaaf.scores', {seasonId: 57130, selectedDate: '2019-02-14'});
</script>
<div id="sr-widget"></div>
JS/Example of using Event Handlers
<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/uscommon/widgetloader","USW", {
language: 'en_us'
});
USW('addWidget', '#sr-widget', 'us.season.ncaaf.scores', {preMatchLinks: 'default', liveMatchLinks: 'default', postMatchLinks: 'default', onItemClick: function(type, obj){alert(type + ': ' + JSON.stringify(obj));}});
</script>
<div id="sr-widget"></div>
Examples of onItemClick targets and emitted props
"team", {"matchId":25131128,"seasonId":75095,"tournamentId":76282,"uniqueTournamentId":27625,"realCategoryId":43,"sportId":16,"awayTeamUid":4352,"homeTeamUid":4312,"matchStatus":"post","uniqueTeamId":4352}>
"player", {"matchId":25131128,"seasonId":75095,"tournamentId":76282,"uniqueTournamentId":27625,"realCategoryId":43,"sportId":16,"awayTeamUid":4352,"homeTeamUid":4312,"matchStatus":"post","playerId":1235378}
"recap", {"matchId":25131128,"seasonId":75095,"tournamentId":76282,"uniqueTournamentId":27625,"realCategoryId":43,"sportId":16,"awayTeamUid":4352,"homeTeamUid":4312,"matchStatus":"post"}