Hosted Implementation
When to Use Hosted Adapter
Getting Started
Integration Example
Self-service example
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Self-Service Adapter Demo</title>
<style>
body {
display: flex;
justify-content: center;
}
.widgets {
max-width: 620px;
width: 100%;
}
.sr-widget {
border: rgba(0, 0, 0, 0.12) solid 1px;
}
</style>
<script type="text/javascript">
(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/<YOUR_CLIENT_ID>/widgetloader","SIR", {
language: 'en' // SIR global options
});
const adapter = {
// < Adapter code will go here >
};
SIR("registerAdapter", adapter);
SIR("addWidget", "#sr-widget", "<WIDGET_NAME>", {
...widgetProps // Replace with widget props
});
</script>
</head>
<body>
<div class="widgets">
<div id="sr-widget">Widget will load here...</div>
</div>
</body>
</html>Hosted Example"
Advanced Configuration and Extensions
Tailoring Widget Behavior
Extending Functionality via Custom Endpoints
BetSlipSelection Function
Argument
Type
Required
Description
Last updated
Was this helpful?