Widgets.us.common.nfl.News

us.common.nfl.news displays season, match or player news for NFL.

To display player news the parameters playerId, seasonId and providerId must be set.

To display match news the parameters matchId, providerId and type must be set.

To display season news the parameters seasonId and providerId must be set.


new News(props)

Parameters
Name Type Description
props object
Properties
Name Type Argument Description
seasonId number

Season id.

matchId string

Match id.

playerId string

Player id.

articleId number

Selected article id.

limit number

Maximum number of articles to display.

type string

Type of content: one of previews, recaps, or contents.

providerId number

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.

onItemClick function <optional>

Function/Event handler. There are three click target areas: team, player and match. They emit NFL teamId, playerId or matchId on click or touch.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.common.nfl.news" data-sr-season-id="2021" data-sr-provider-id="2"></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.nfl.news', {seasonId: 2021, providerId: 2});
</script>