1.0.5 • Published 2 years ago
fans-united-integration v1.0.5
Fans United Integration
How to use
1.
npm install fans-united-integration
or
yarn add fans-united-integration
- 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:
Name | Description | Example value | Required |
---|---|---|---|
theme | Switches between component themes | light | NO |
market | Controls the market of the component | FT_1X2 | NO |
subscribers | Hooks to specific events | See used value above | YES |
matchId | The id of the match | '2757002' | YES |
fansUnitedExpanded | Controls whether the component is expanded by default | true | NO |
homeTeam | The name of the home team | Arsenal | YES |
awayTeam | The name of the away team | Manchester City | YES |
fansUnitedIdSchema | The schema that maps match ids | sportal365 | NO |
fansUnitedLanguage | Controls the component language | en | NO |
fansUnitedApiKey | Your api key | 'your-api-key' | YES |
fansUnitedClientId | Your api client id | 'your-client-id' | YES |
fansUnitedEnvironment | Fans united env | 'prod' | YES |
fansUnitedGetAuthToken | A function that gets the auth token (should return a string) | See used value above | YES |
fansUnitedSignOut | A function that signs the user out | See used value above | YES |
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'