News
us.common.News displays full news articles, with the capability to filter by season, game, and player.
- To display player news, the parameters
playerId
,seasonId
andproviderId
must be set. - To display game news, the parameters
matchId
,providerId
andtype
must be set. - To display season news, the parameters
seasonId
andproviderId
must be set.
Parameters
Name | Type | Description | ||||
---|---|---|---|---|---|---|
props |
object | properties | ||||
Name | Type | Description | ||||
seasonId |
number | optional | Season ID | |||
matchId |
string | optional | Match ID | |||
playerId |
string | optional | Player ID | |||
articleId |
string | optional | Article ID | |||
limit |
number | optional | Maximum number of articles to display. | |||
type |
string | optional | Type of content. Valid types: previews , recaps , or contents . |
|||
providerId |
number | optional | ID of the news provider. 2 for Associated Press, 3 for Associated Press Premium. |
|||
border |
boolean | optional | If true enables a border around the widget. |
Examples
<div class="sr-widget" data-sr-widget="us.common.news" data-sr-season-id="88607" data-sr-provider-id="2"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader" data-sr-language="en_us" async></script>
<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/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
language: 'en_us'
});
SIR('addWidget', '#sr-widget', 'us.common.news', {seasonId: 88607, providerId: 2});
</script>
<div id="sr-widget"></div>
Updated almost 2 years ago