![](img/betRecommendationSwipeBets.png)
Parameters
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
props |
object | |||
user |
string | number | The id of the user. |
||
buttonTitle |
string | 'Swipe Bet' | Displayed text in the button. |
|
productTitle |
string | 'SWIPE BET' | The name in the header. If set value to |
|
headerIcon |
string | URL to a custom icon. |
||
buttonIcon |
string | false | URL for custom icon.
If set value to |
||
maxSelectionsMultiMode |
number | 12 | The number of maximum selections for multi mode in Bet Slip. |
|
maxSelectionsSingleMode |
number | 12 | The number of maximum selections for single mode in Bet Slip. |
|
isMobile |
boolean | false | Mobile view of the widget. |
|
betSlipMode |
Array.<('multi'|'single')> | Array<'multi'> | Bet mode selector. |
|
outcomeNamePosition |
'start' | 'end' | 'top' | 'bottom' | 'start' | Positioning of outcome name. |
|
filters |
object | Filters property is an object where you can set recommendation type, sports and time. |
||
filters.sport |
object | Object with |
||
filters.sport.available |
Array.<(string|number)> | |||
filters.time |
object | Object with |
||
filters.time.available |
'live' | 'not_started' | Specifies the availability status of an event based on its start time.
The value can be either |
||
filters.time.range |
number | Retrieves events based on the specified time range, in hours. Must be between 0 and 72. |
||
disableLazyLoad |
string | false | When set to |
|
sportsMapping |
object | Map your sport ids with Sportradar ones in case you are not using Sportradar sport ids (available sports).
|
||
branding |
object | Customization options. Currently supports customization of sports icons. Valid structure is:
|
||
customJerseys |
object | Use this property to load custom jerseys. You can set up custom jersey images (home/away) for each team within specific tournament You can also set up default jerseys (home/away) for each tournament in case if the team jersey is missing. Recommended image size is 180px x 180px. Valid structure is:
|
||
onItemClick |
OnItemClick Widgets.BetRecommendation.Integration.OnItemClick | Set a callback function to be executed upon specific actions within the widget. Available targets:
For more details, refer to OnItemClick. |
||
debug |
boolean | When set to |
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.swipeBet');
</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.swipeBet', {
buttonTitle: 'Bet now',
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>