1.0.5 • Published 2 years ago

fans-united-integration v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Fans United Integration

How to use

1.

  npm install fans-united-integration

or

  yarn add fans-united-integration
  1. Import styles (preferably in your main file)
import 'fans-united-integration/dist/style.css';

3.

    <FansUnitedFullTimeOutcome
      theme="dark"
      market="FT_1X2"
      subscribers={{onPredictionSuccess: [(data) =>
        console.log('On prediction success event:', data)]}}
      matchId="match-id"
      fansUnitedExpanded={true}
      homeTeam="home-team-name"
      awayTeam="away-team-name"
      fansUnitedIdSchema="id-schema"
      fansUnitedApiKey="your-api-key"
      fansUnitedClientId="your-client-id"
      fansUnitedEnvironment="prod"
      fansUnitedGetAuthToken={() => 'your-token'}
      fansUnitedSignOut={() => ''}
    />

Props:

NameDescriptionExample valueRequired
themeSwitches between component themeslightNO
marketControls the market of the componentFT_1X2NO
subscribersHooks to specific eventsSee used value aboveYES
matchIdThe id of the match'2757002'YES
fansUnitedExpandedControls whether the component is expanded by defaulttrueNO
homeTeamThe name of the home teamArsenalYES
awayTeamThe name of the away teamManchester CityYES
fansUnitedIdSchemaThe schema that maps match idssportal365NO
fansUnitedLanguageControls the component languageenNO
fansUnitedApiKeyYour api key'your-api-key'YES
fansUnitedClientIdYour api client id'your-client-id'YES
fansUnitedEnvironmentFans united env'prod'YES
fansUnitedGetAuthTokenA function that gets the auth token (should return a string)See used value aboveYES
fansUnitedSignOutA function that signs the user outSee used value aboveYES

List of possible values:

  • theme - 'light' | 'dark'
  • theme - 'FT_1X2'
  • fansUnitedExpanded - true | false
  • fansUnitedIdSchema - 'native' | 'enetpulse' | 'sportradar' | 'sportal365'
  • fansUnitedLanguage - 'en' | 'bg' | 'ro'
  • fansUnitedEnvironment - 'dev' | 'staging' | 'prod'
1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago