Widgets.us.common.MatchList

A us.common.matchList brings list of past, present and future matches. Scores are automatically updated in real-time during live matches.

This widget uses local storage for persisting end-user selection (date, live, show/hide odds). For the widget to render you don't need to provide any properties, all are optional.

Widget displays date/time in end user's local timezone (based on end user's operating system settings).


new MatchList(props)

Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
matchId number <optional>

Provided matchId will be selected in the list with hover style.

dayOffset number <optional>
0

Day offset from the current date. Default value is 0 (= current date).

sportId number <optional>
1

Sport id. Check enum.sport to get valid values.

isLive boolean <optional>
false

When set to true, shows live matches only.

showOdds boolean <optional>
false

When set to true, shows odds.

disableOdds boolean <optional>
false

When set to true, disables odds button in the right corner.

onItemClick function <optional>

Function/Event handler, emits matchId on click or touch.

onTrack function <optional>

Function/event handler, see Widgets.onTrack

filterUtIds string <optional>

Comma-separated unique tournament ids. When set, only matches within specified unique tournaments will be listed.

filterRcIds string <optional>

Comma-separated real category ids. When set, only matches within specified real categories will be listed.

favoriteTournaments string <optional>

Comma-separated unique tournament ids. When set, tournaments with specified unique id will be added to the top of the matchlist.

oddsDeeplinkLabels object <optional>

An object of deeplinking labels.

deeplinkParams object <optional>

An object of deeplinking params.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.common.matchList" data-sr-sport-id="1"></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.common.matchList', {sportId: 1});
</script>
<div id="sr-widget"></div>

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.media.sportradar.com/uscommon/widgetloader","USW", {
        language: 'en_us'
    });
    USW('addWidget', '#sr-widget', 'us.common.matchList', {sportId: 1, onItemClick: function(type, obj){alert('matchId: ' + obj.matchId);}});
</script>
<div id="sr-widget"></div>