1.0.11 • Published 5 years ago

broadage-widget-react v1.0.11

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

broadage-widget-react

Broadage widgets react wrapper

  • Tournament list widget
  • Livescore widget
  • Tournament Info widget
  • Tournament Teams widget
  • Tournament Fixture widget
  • Team Fixture widget
  • Tournament Standings widget
  • Leaderboard widget
  • Leaderboard Points widget
  • Match Summary widget
  • Match Boxscore widget
  • Match Play by Play widget
  • Team Squad widget
  • Team Schedule widget
  • Leaderboard widget
  • Leaderboard Goals widget
  • Leaderboard Assists widget
  • Leaderboard Yellow Cards widget
  • Leaderboard Red Cards widget
  • Team Squad with Statistics widget
  • Timeline widget
  • Lineup widget
  • Formation widget
  • Lead Tracker widget
  • Match Center widget
  • Match Center widget
  • more

Installation

yarn add broadage-widget-react or npm install broadage-widget-react --save

Products and Documentations

Main Page Developers Guide Widget Guide

Usage

import React, { Component } from 'react';
import BroadageWidget from 'broadage-widget-react';

export class SampleSoccerFixture extends Component {
     onActionCallback = (widgetType, actionType, actionPayload) => {
        console.log(widgetType, actionType, actionPayload);
     };
    
     render() {
         // Soccer Fixture Sample
         return (
             <BroadageWidget
                 requiredFields={{ tournamentId: 1 }}
                 options={{ lang: 'en-US' }}
                 widget="soccerFixture"
                 bundleId="soccer-fx"
                 accountId="0000-0000-0000"
                 className="widget-wrapper"
                 queryStringParse={{ tournamentId: "tid" }}
                 onActionCallback={this.onActionCallback}
             />
         )
     }
}

export class SampleBasketballMatchCenter extends Component {
     onActionCallback = (widgetType, actionType, actionPayload) => {
         console.log(widgetType, actionType, actionPayload);
     };
     
     render() {
         // Basketball Match Center Sample
         return (
             <BroadageWidget
                 requiredFields={{ matchId: 286298 }}
                 options={{ lang: 'fr-FR', theme: "darkBlue" }}
                 widget="basketballMatchCenter"
                 bundleId="basketball-mc"
                 accountId="0000-0000-0000"
                 className="widget-wrapper"
                 queryStringParse={{ matchId: "mid" }}
                 onActionCallback={this.onActionCallback}
             />
         )
     }
}

Props

NameTypeDescription
requiredFieldsObjectMandatory fields for widget in work are defined in this field
options (optional using)ObjectLanguage, theme, etc. properties are assigned in this field.
widgetStringThe type of widget is define in this field
bundleIdStringThe widget bundle id is define in this field
accountIdStringBroadage account number is defined in this field
className (optional using)StringAssigns class name to main container
queryStringParse (optional using)ObjectMatch the URL query string and widget mandatory fields to each other.
onActionCallback (optional using)FunctionThis callback function is triggered by user changed filters, score change etc.

Widget type to bundleId

TypeBundle Id
soccerFixturesoccer-fx
trioComboall-tc
liveScoreTickerall-lst
liveScoreDetailedall-lsd
liveScoreall-ls
iceHockeyScoreboardiceHockey-sb
iceHockeyStandingsiceHockey-st
iceHockeyFixtureiceHockey-fx
baseballScoreboardbaseball-sb
baseballStandingsbaseball-st
baseballFixturebaseball-fx
footballPlayByPlayfootball-pbp
footballGameLeadersfootball-gl
footballLiveTeamStatisticsfootball-ltsts
footballLiveMatchStatisticsfootball-lmsts
footballBoxScorefootball-bs
footballScoreboardfootball-sb
footballStandingsfootball-st
footballFixturefootball-fx
volleyballH2hStandingsvolleyball-hst
volleyballTeamStandingsvolleyball-tst
volleyballStandingsvolleyball-st
volleyballTeamSchedulevolleyball-ts
volleyballFixturevolleyball-fx
handballH2hStandingshandball-hst
handballStandingshandball-st
handballTeamSchedulehandball-ts
handballFixturehandball-fx
basketballMatchCenterbasketball-mc
basketballPlayByPlaybasketball-pbp
basketballLiveMatchStatisticsbasketball-lmsts
basketballGameLeadersbasketball-gl
basketballLeadTrackerbasketball-lt
basketballBoxScorebasketball-bs
basketballMatchInfobasketball-mi
basketballScoreboardbasketball-sb
basketballTeamReboundsLeaderboardPerGamebasketball-trlbpg
basketballTeamPointsLeaderboardPerGamebasketball-tplbpg
basketballTeamAssistsLeaderboardPerGamebasketball-talbpg
basketballLeaderboardReboundsPerGamebasketball-lbrpg
basketballLeaderboardAssistsPerGamebasketball-lbapg
basketballLeaderboardPointsPerGamebasketball-lbppg
basketballSquadStatsbasketball-sqs
basketballH2hStandingsbasketball-hst
basketballTeamStandingsbasketball-tst
basketballStandingsbasketball-st
basketballTeamSchedulebasketball-ts
basketballFixturebasketball-fx
soccerMatchCentersoccer-mc
soccerMatchInfosoccer-mi
soccerFormationsoccer-fmt
soccerLineupsoccer-lu
soccerTimelinesoccer-tl
soccerLiveMatchStatisticssoccer-lmsts
soccerScoreboardsoccer-sb
soccerCommentarysoccer-cm
soccerLiveFixturesoccer-lfx
soccerTeamCardsLeaderboardsoccer-tclb
soccerTeamAssistsLeaderboardsoccer-talb
soccerTeamGoalsLeaderboardsoccer-tglb
soccerLeaderboardCardssoccer-lbc
soccerLeaderboardAssistssoccer-lba
soccerLeaderboardGoalssoccer-lbg
soccerSquadStatssoccer-sqs
soccerH2hStandingssoccer-hst
soccerTeamStandingssoccer-tst
soccerStandingssoccer-st
soccerTeamSchedulesoccer-ts