![](img/betRecommendationLeagues_1.png)
![](img/betRecommendationLeagues_2.png)
Parameters
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
props |
object | Optional props object. |
||
user |
string | number | The user ID. |
||
activeTournamentId |
string | number | The active tournament ID. |
||
count |
number | 5 | The number of leagues to show. Must be between 1 and 30. |
|
labelType |
'sport' | 'country' | 'hidden' | hidden | The type of label to display on the tabs. |
|
iconType |
'sport' | 'flag' | 'hidden' | sport | The type of icon to display on the tabs. |
|
filters.recommendationType.available |
'recommended' | 'popular' | 'trending' | Available recommendation types. |
||
filters.time.range |
number | Retrieves events based on the specified time range, in hours. Must be between 0 and 72. |
||
filters.time.available |
'live' | Specifies the availability status of an event based on its start time.
The value can be |
||
filters.sport.available |
Array.<(string|number)> | An array of available sports, as defined here. |
||
onItemClick |
OnItemClick Widgets.BetRecommendation.Integration.OnItemClick | A function to be called when a tab is clicked. Set a callback to run when the tournament is clicked. For more information check OnItemClick. |
Examples
#1
<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('registerAdapter', '{ADAPTER_NAME}');
SIR('addWidget', '#sr-widget', 'betRecommendation.leagues');
</script>
<div id="sr-widget"></div>
#2
<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('registerAdapter', '{ADAPTER_NAME}');
SIR('addWidget', '#sr-widget', 'betRecommendation.leagues', {
branding: {
sports: {
icons: { // custom icons for sports
1: 'path_to_image_file',
2: 'path_to_image_file',
5: 'path_to_image_file',
20: 'path_to_image_file'
}
}
},
onItemClick: function(target, data) {
console.log(target, data);
}
});
</script>
<div id="sr-widget"></div>