Class SportDataProviderImpl
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.SportDataProviderImpl
- All Implemented Interfaces:
SportDataProvider
Provides access to sport related data (sports, tournaments, sport events, ...)
-
Method Summary
Modifier and TypeMethodDescriptioncacheExport(EnumSet<CacheType> cacheType) Exports current items in the cachevoidcacheImport(List<ExportableCi> items) Imports provided items into cachesdeleteSportEventsFromCache(Date before) Deletes the sport events from cache which are scheduled before specified dateReturns all the active tournaments (the returned data is translated in the default locale configured with theUofConfigurationImpl) (possible types:BasicTournament,Tournament,Stage)getActiveTournaments(String sportName) Returns all the active tournaments of a specific sport (the returned data is translated in the default locale configured with theUofConfigurationImpl) (possible types:BasicTournament,Tournament,Stage)getActiveTournaments(String sportName, Locale locale) Returns all the active tournaments of a specific sport (the returned data is translated in the specifiedLocale) (possible types:BasicTournament,Tournament,Stage)getActiveTournaments(Locale locale) Returns all the active tournaments (the returned data is translated in the specifiedLocale) (possible types:BasicTournament,Tournament,Stage)getAvailableTournaments(Urn sportId) Returns all the available tournaments of a specific sport (the returned data is translated in the default locale configured with theUofConfigurationImpl) (possible types:BasicTournament,Tournament,Stage)getAvailableTournaments(Urn sportId, Locale locale) Returns all the available tournaments for a specific sport (the returned data is translated in the specifiedLocale) (possible types:BasicTournament,Tournament,Stage)getCompetition(Urn id) Returns aCompetitionrepresenting the specified competition (the returned data is translated in the configuredLocales using theUofConfigurationImpl)getCompetition(Urn id, Locale locale) Returns aCompetitionrepresenting the specified competition (the returned data is translated in the specifiedLocale)getCompetitionsFor(Date date) Returns a list of all competitions scheduled on the specified date (the returned data is translated in the configuredLocales using theUofConfigurationImpl)getCompetitionsFor(Date date, Locale locale) Returns a list of all competitions scheduled on the specified date (the returned data is translated in the specifiedLocale)getCompetitor(Urn id) Returns aCompetitorrepresenting the specified competitor (the returned data is translated in the configuredLocales using theUofConfigurationImpl)getCompetitor(Urn id, Locale locale) Returns aCompetitorrepresenting the specified competitor (the returned data is translated in the specifiedLocale)Returns the list of all fixtures that have changed in the last 24 hoursgetFixtureChanges(Date after, Urn sportId) Returns the list of all fixtures that have changed in the last 24 hoursgetFixtureChanges(Date after, Urn sportId, Locale locale) Returns the list of all fixtures that have changed in the last 24 hoursgetFixtureChanges(Locale locale) Returns the list of all fixtures that have changed in the last 24 hoursgetListOfSportEvents(int startIndex, int limit) Lists almost all events we are offering prematch odds for.getListOfSportEvents(int startIndex, int limit, Locale locale) Lists almost all events we are offering prematch odds for.Returns all the competitions that are currently live (the returned data is translated in the configuredLocales using theUofConfigurationImpl)getLiveCompetitions(Locale locale) Returns all the competitions that are currently live (the returned data is translated in the specifiedLocale)getLongTermEvent(Urn id) Returns the specified long term event (the returned data is translated in the configuredLocales using theUofConfigurationImpl)getLongTermEvent(Urn id, Locale locale) Returns the specified long term event (the returned data is translated in the specifiedLocale)getLotteries(Locale locale) Returns all the available lotteries (the returned data is translated in the specifiedLocale)Returns the list ofPeriodStatusfrom the sport event period summary endpointgetPlayerProfile(Urn id) Returns aPlayerProfilerepresenting the specified competitor (the returned data is translated in the configuredLocales using theUofConfigurationImpl)getPlayerProfile(Urn id, Locale locale) Returns aPlayerProfilerepresenting the specified competitor (the returned data is translated in the specifiedLocale)Returns the list of all fixtures that have changed in the last 24 hoursgetResultChanges(Date after, Urn sportId) Returns the list of all fixtures that have changed in the last 24 hoursgetResultChanges(Date after, Urn sportId, Locale locale) Returns the list of all fixtures that have changed in the last 24 hoursgetResultChanges(Locale locale) Returns the list of all fixtures that have changed in the last 24 hoursgetSportEvent(Urn id) Returns the specified sport event (the returned data is translated in the configuredLocales using theUofConfigurationImpl)getSportEvent(Urn id, Locale locale) Returns the specified sport event (the returned data is translated in the specifiedLocale)Returns all the available sports (the returned data is translated in the configuredLocales using theUofConfigurationImpl)Returns all the available sports (the returned data is translated in the specifiedLocale)getTimelineEvents(Urn id, Locale locale) Returns the list ofTimelineEventfor the sport eventvoidpurgeCompetitorProfileCacheData(Urn competitorId) Purges the associated competitor cache itemvoidpurgePlayerProfileCacheData(Urn playerId) Purges the associated player profile cache itemvoidpurgeSportEventCacheData(Urn eventId) Purges the associated sport event cache itemvoidpurgeSportEventCacheData(Urn eventId, boolean includeStatusPurge) Purges the associated sport event cache item
-
Method Details
-
getSports
Returns all the available sports (the returned data is translated in the configuredLocales using theUofConfigurationImpl)- Specified by:
getSportsin interfaceSportDataProvider- Returns:
- - all the available sports
-
getSports
Returns all the available sports (the returned data is translated in the specifiedLocale)- Specified by:
getSportsin interfaceSportDataProvider- Parameters:
locale- - theLocalein which to provide the data- Returns:
- - all the available sports translated in the specified locale
-
getActiveTournaments
Returns all the active tournaments (the returned data is translated in the default locale configured with theUofConfigurationImpl) (possible types:BasicTournament,Tournament,Stage)- Specified by:
getActiveTournamentsin interfaceSportDataProvider- Returns:
- - all the active tournaments
-
getActiveTournaments
Returns all the active tournaments (the returned data is translated in the specifiedLocale) (possible types:BasicTournament,Tournament,Stage)- Specified by:
getActiveTournamentsin interfaceSportDataProvider- Parameters:
locale- - theLocalein which to provide the data- Returns:
- - all the active tournaments translated in the specified locale
-
getActiveTournaments
Returns all the active tournaments of a specific sport (the returned data is translated in the default locale configured with theUofConfigurationImpl) (possible types:BasicTournament,Tournament,Stage)- Specified by:
getActiveTournamentsin interfaceSportDataProvider- Parameters:
sportName- - the specific sport name- Returns:
- - all the active tournaments of a specific sport
-
getActiveTournaments
Returns all the active tournaments of a specific sport (the returned data is translated in the specifiedLocale) (possible types:BasicTournament,Tournament,Stage)- Specified by:
getActiveTournamentsin interfaceSportDataProvider- Parameters:
sportName- - the specific sport namelocale- - theLocalein which to provide the data- Returns:
- - all the active tournaments of a specific sport translated in the specified locale
-
getCompetitionsFor
Returns a list of all competitions scheduled on the specified date (the returned data is translated in the configuredLocales using theUofConfigurationImpl)- Specified by:
getCompetitionsForin interfaceSportDataProvider- Parameters:
date- - the date for which to list all active competitions- Returns:
- - a list of all competitions scheduled on the specified date
-
getCompetitionsFor
Returns a list of all competitions scheduled on the specified date (the returned data is translated in the specifiedLocale)- Specified by:
getCompetitionsForin interfaceSportDataProvider- Parameters:
date- - the date for which to list all active competitionslocale- - theLocalein which to provide the data- Returns:
- - a list of all competitions scheduled on the specified date (the data is translated in the provided locale)
-
getLiveCompetitions
Returns all the competitions that are currently live (the returned data is translated in the configuredLocales using theUofConfigurationImpl)- Specified by:
getLiveCompetitionsin interfaceSportDataProvider- Returns:
- - all the competitions that are currently live
-
getLiveCompetitions
Returns all the competitions that are currently live (the returned data is translated in the specifiedLocale)- Specified by:
getLiveCompetitionsin interfaceSportDataProvider- Parameters:
locale- - theLocalein which to provide the data- Returns:
- - all the competitions that are currently live (the data is translated in the provided locale)
-
getSportEvent
Returns the specified sport event (the returned data is translated in the configuredLocales using theUofConfigurationImpl)- Specified by:
getSportEventin interfaceSportDataProvider- Parameters:
id- - anUrnidentifier specifying the sport event- Returns:
- - the specified sport event
-
getSportEventForEventChange
-
getSportEvent
Returns the specified sport event (the returned data is translated in the specifiedLocale)- Specified by:
getSportEventin interfaceSportDataProvider- Parameters:
id- - anUrnidentifier specifying the requested long term eventlocale- - theLocalein which to provide the data- Returns:
- - the specified sport event translated in the provided locale
-
getLongTermEvent
Returns the specified long term event (the returned data is translated in the configuredLocales using theUofConfigurationImpl)- Specified by:
getLongTermEventin interfaceSportDataProvider- Parameters:
id- - anUrnidentifier specifying the requested long term event- Returns:
- - the specified long term event
-
getLongTermEvent
Returns the specified long term event (the returned data is translated in the specifiedLocale)- Specified by:
getLongTermEventin interfaceSportDataProvider- Parameters:
id- - anUrnidentifier specifying the requested long term eventlocale- - theLocalein which to provide the data- Returns:
- - the specified tournament translated in the provided locale
-
getCompetition
Returns aCompetitionrepresenting the specified competition (the returned data is translated in the configuredLocales using theUofConfigurationImpl)- Specified by:
getCompetitionin interfaceSportDataProvider- Parameters:
id- - anUrnidentifier specifying the competition requested- Returns:
- - a
Competitionrepresenting the specified competition
-
getCompetition
Returns aCompetitionrepresenting the specified competition (the returned data is translated in the specifiedLocale)- Specified by:
getCompetitionin interfaceSportDataProvider- Parameters:
id- - anUrnidentifier specifying the competition requestedlocale- - theLocalein which to provide the data- Returns:
- - a
Competitionrepresenting the specified competition translated in the provided locale
-
getCompetitor
Returns aCompetitorrepresenting the specified competitor (the returned data is translated in the configuredLocales using theUofConfigurationImpl)- Specified by:
getCompetitorin interfaceSportDataProvider- Parameters:
id- - a unique competitorUrnidentifier- Returns:
- - a
Competitorrepresenting the competitor associated with the providedUrn
-
getCompetitor
Returns aCompetitorrepresenting the specified competitor (the returned data is translated in the specifiedLocale)- Specified by:
getCompetitorin interfaceSportDataProvider- Parameters:
id- - a unique competitorUrnidentifierlocale- - theLocalein which to provide the data- Returns:
- - a
Competitorrepresenting the competitor associated with the providedUrn
-
getPlayerProfile
Returns aPlayerProfilerepresenting the specified competitor (the returned data is translated in the configuredLocales using theUofConfigurationImpl)- Specified by:
getPlayerProfilein interfaceSportDataProvider- Parameters:
id- - a unique playerUrnidentifier- Returns:
- - a
PlayerProfilerepresenting the specified competitor
-
getPlayerProfile
Returns aPlayerProfilerepresenting the specified competitor (the returned data is translated in the specifiedLocale)- Specified by:
getPlayerProfilein interfaceSportDataProvider- Parameters:
id- - a unique playerUrnidentifierlocale- - theLocalein which to provide the data- Returns:
- - a
PlayerProfilerepresenting the specified competitor
-
purgeSportEventCacheData
Purges the associated sport event cache item- Specified by:
purgeSportEventCacheDatain interfaceSportDataProvider- Parameters:
eventId- the identifier of the cache item to purge
-
purgeSportEventCacheData
Purges the associated sport event cache item- Specified by:
purgeSportEventCacheDatain interfaceSportDataProvider- Parameters:
eventId- the identifier of the cache item to purgeincludeStatusPurge- an indication if the associated sport event status should be purged too
-
purgeCompetitorProfileCacheData
Purges the associated competitor cache item- Specified by:
purgeCompetitorProfileCacheDatain interfaceSportDataProvider- Parameters:
competitorId- the identifier of the cache item to purge
-
purgePlayerProfileCacheData
Purges the associated player profile cache item- Specified by:
purgePlayerProfileCacheDatain interfaceSportDataProvider- Parameters:
playerId- the identifier of the cache item to purge
-
getFixtureChanges
Returns the list of all fixtures that have changed in the last 24 hours- Specified by:
getFixtureChangesin interfaceSportDataProvider- Returns:
- list of
FixtureChange
-
getFixtureChanges
Returns the list of all fixtures that have changed in the last 24 hours- Specified by:
getFixtureChangesin interfaceSportDataProvider- Parameters:
locale- - theLocalein which to provide the data- Returns:
- list of
FixtureChange
-
getFixtureChanges
Returns the list of all fixtures that have changed in the last 24 hours- Specified by:
getFixtureChangesin interfaceSportDataProvider- Parameters:
after- specifies the starting date and time for filteringsportId- specifies the sport for which the fixtures should be returned- Returns:
- list of
FixtureChange
-
getFixtureChanges
Returns the list of all fixtures that have changed in the last 24 hours- Specified by:
getFixtureChangesin interfaceSportDataProvider- Parameters:
after- specifies the starting date and time for filteringsportId- specifies the sport for which the fixtures should be returnedlocale- - theLocalein which to provide the data- Returns:
- list of
FixtureChange
-
getResultChanges
Returns the list of all fixtures that have changed in the last 24 hours- Specified by:
getResultChangesin interfaceSportDataProvider- Returns:
- list of
ResultChange
-
getResultChanges
Returns the list of all fixtures that have changed in the last 24 hours- Specified by:
getResultChangesin interfaceSportDataProvider- Parameters:
locale- - theLocalein which to provide the data- Returns:
- list of
ResultChange
-
getResultChanges
Returns the list of all fixtures that have changed in the last 24 hours- Specified by:
getResultChangesin interfaceSportDataProvider- Parameters:
after- specifies the starting date and time for filteringsportId- specifies the sport for which the fixtures should be returned- Returns:
- list of
ResultChange
-
getResultChanges
Returns the list of all fixtures that have changed in the last 24 hours- Specified by:
getResultChangesin interfaceSportDataProvider- Parameters:
after- specifies the starting date and time for filteringsportId- specifies the sport for which the fixtures should be returnedlocale- - theLocalein which to provide the data- Returns:
- list of
ResultChange
-
getListOfSportEvents
Lists almost all events we are offering prematch odds for. This endpoint can be used during early startup to obtain almost all fixtures. This endpoint is one of the few that uses pagination.- Specified by:
getListOfSportEventsin interfaceSportDataProvider- Parameters:
startIndex- starting index (zero based)limit- how many records to return (max: 1000)- Returns:
- a list of sport events
-
getListOfSportEvents
Lists almost all events we are offering prematch odds for. This endpoint can be used during early startup to obtain almost all fixtures. This endpoint is one of the few that uses pagination.- Specified by:
getListOfSportEventsin interfaceSportDataProvider- Parameters:
startIndex- starting index (zero based)limit- how many records to return (max: 1000)locale- theLocalein which to provide the data- Returns:
- a list of sport events
-
getAvailableTournaments
Returns all the available tournaments of a specific sport (the returned data is translated in the default locale configured with theUofConfigurationImpl) (possible types:BasicTournament,Tournament,Stage)- Specified by:
getAvailableTournamentsin interfaceSportDataProvider- Parameters:
sportId- - the specific sport id- Returns:
- - all the available tournaments of a specific sport
-
getAvailableTournaments
Returns all the available tournaments for a specific sport (the returned data is translated in the specifiedLocale) (possible types:BasicTournament,Tournament,Stage)- Specified by:
getAvailableTournamentsin interfaceSportDataProvider- Parameters:
sportId- - the specific sport idlocale- - theLocalein which to provide the data- Returns:
- - all the available tournaments for a specific sport translated in the specified locale
-
deleteSportEventsFromCache
Deletes the sport events from cache which are scheduled before specified date- Specified by:
deleteSportEventsFromCachein interfaceSportDataProvider- Parameters:
before- the scheduled Date used to delete sport events from cache- Returns:
- number of deleted items
-
cacheExport
Exports current items in the cache- Specified by:
cacheExportin interfaceSportDataProvider- Parameters:
cacheType- specifies what type of cache items will be exported- Returns:
- List of
ExportableCicontaining all the items currently in the cache
-
cacheImport
Imports provided items into caches- Specified by:
cacheImportin interfaceSportDataProvider- Parameters:
items- List ofExportableCicontaining the items to be imported
-
getLotteries
Returns all the available lotteries (the returned data is translated in the specifiedLocale)- Specified by:
getLotteriesin interfaceSportDataProvider- Parameters:
locale- - theLocalein which to provide the data- Returns:
- - all available lotteries in specified locale
-
getPeriodStatuses
public List<PeriodStatus> getPeriodStatuses(Urn id, Locale locale, List<Urn> competitorIds, List<Integer> periods) Returns the list ofPeriodStatusfrom the sport event period summary endpoint- Specified by:
getPeriodStatusesin interfaceSportDataProvider- Parameters:
id- the id of the sport event to be fetchedlocale- theLocalein which to provide the data (can be null)competitorIds- the list of competitor ids to fetch the results for (can be null)periods- the list of period ids to fetch the results for (can be null)- Returns:
- the list of
PeriodStatusfrom the sport event period summary endpoint
-
getTimelineEvents
Returns the list ofTimelineEventfor the sport event- Specified by:
getTimelineEventsin interfaceSportDataProvider- Parameters:
id- the id of the sport event to be fetchedlocale- theLocalein which to provide the data (can be null)- Returns:
- the list of
TimelineEventfor the sport event
-