Interface ISportDataProvider
- Namespace
- Sportradar.OddsFeed.SDK.Api.Managers
- Assembly
- Sportradar.OddsFeed.SDK.dll
Defines a contract implemented by classes used to provide sport related data (sports, tournaments, sport events, ...)
public interface ISportDataProvider
Methods
CacheExportAsync(CacheType)
Exports current items in the cache
Task<IEnumerable<ExportableBase>> CacheExportAsync(CacheType cacheType)
Parameters
cacheTypeCacheTypeSpecifies what type of cache items will be exported
Returns
- Task<IEnumerable<ExportableBase>>
Collection of ExportableBase containing all the items currently in the cache
CacheImportAsync(IEnumerable<ExportableBase>)
Imports provided items into caches
Task CacheImportAsync(IEnumerable<ExportableBase> items)
Parameters
itemsIEnumerable<ExportableBase>Collection of ExportableBase containing the items to be imported
Returns
- Task
No return
DeleteCompetitorFromCache(Urn)
Delete the competitor from cache
void DeleteCompetitorFromCache(Urn id)
Parameters
idUrnA Urn specifying the id of ICompetitor to be deleted
DeletePlayerProfileFromCache(Urn)
Delete the player profile from cache
void DeletePlayerProfileFromCache(Urn id)
Parameters
idUrnA Urn specifying the id of IPlayerProfile to be deleted
DeleteSportEventFromCache(Urn, bool)
Delete the sport event from cache
void DeleteSportEventFromCache(Urn id, bool includeEventStatusDeletion = false)
Parameters
idUrnA Urn specifying the id of ISportEvent to be deleted
includeEventStatusDeletionboolDelete also ISportEventStatus from the cache
DeleteSportEventsFromCache(DateTime)
Deletes the sport events from cache which are scheduled before specified date
int DeleteSportEventsFromCache(DateTime before)
Parameters
beforeDateTimeThe scheduled DateTime used to delete sport events from cache
Returns
- int
Number of deleted items
DeleteTournamentFromCache(Urn)
Delete the tournament from cache
void DeleteTournamentFromCache(Urn id)
Parameters
idUrnA Urn specifying the id of ILongTermEvent to be deleted
GetActiveTournamentsAsync(CultureInfo)
Asynchronously gets a list of active IEnumerable<T>
Task<IEnumerable<ISportEvent>> GetActiveTournamentsAsync(CultureInfo culture = null)
Parameters
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<ISportEvent>>
A Task<TResult> representing the async operation
Remarks
Lists all ISportEvent that are cached (once schedule is loaded)
GetAvailableTournamentsAsync(Urn, CultureInfo)
Asynchronously gets a list of available IEnumerable<T> for a specific sport
Task<IEnumerable<ISportEvent>> GetAvailableTournamentsAsync(Urn sportId, CultureInfo culture = null)
Parameters
sportIdUrnA Urn specifying the sport to retrieve
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<ISportEvent>>
A Task<TResult> representing the async operation
Remarks
Lists all available tournaments for a sport event we provide coverage for
GetCompetition(Urn, Urn, CultureInfo)
Gets a ICompetition representing the specified sport event in language specified by culture or a null reference if the sport event with
specified id does not exist
ICompetition GetCompetition(Urn id, Urn sportId, CultureInfo culture = null)
Parameters
idUrnA Urn specifying the sport event to retrieve
sportIdUrnA Urn of the sport this event belongs to
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- ICompetition
A ICompetition representing the specified sport event or a null reference if the requested sport event does not exist
GetCompetition(Urn, CultureInfo)
Gets a ICompetition representing the specified sport event in language specified by culture or a null reference if the sport event with
specified id does not exist
ICompetition GetCompetition(Urn id, CultureInfo culture = null)
Parameters
idUrnA Urn specifying the sport event to retrieve
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- ICompetition
A ICompetition representing the specified sport event or a null reference if the requested sport event does not exist
GetCompetitorAsync(Urn, CultureInfo)
Asynchronously gets a ICompetitor
Task<ICompetitor> GetCompetitorAsync(Urn id, CultureInfo culture = null)
Parameters
idUrnA Urn specifying the id for which ICompetitor to be retrieved
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<ICompetitor>
A ICompetitor representing the specified competitor or a null reference
GetFixtureChangesAsync(CultureInfo)
Gets the list of all fixtures that have changed in the last 24 hours
Task<IEnumerable<IFixtureChange>> GetFixtureChangesAsync(CultureInfo culture = null)
Parameters
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<IFixtureChange>>
A list of all fixtures that have changed in the last 24 hours
GetFixtureChangesAsync(DateTime?, Urn, CultureInfo)
Gets the list of all fixtures that have changed in the last 24 hours
Task<IEnumerable<IFixtureChange>> GetFixtureChangesAsync(DateTime? after, Urn sportId, CultureInfo culture = null)
Parameters
afterDateTime?A DateTime specifying the starting date and time for filtering
sportIdUrnA Urn specifying the sport for which the fixtures should be returned
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<IFixtureChange>>
A list of all fixtures that have changed in the last 24 hours
GetListOfSportEventsAsync(int, int, CultureInfo)
Asynchronously gets a list of IEnumerable<T>
Task<IEnumerable<ICompetition>> GetListOfSportEventsAsync(int startIndex, int limit, CultureInfo culture = null)
Parameters
startIndexintStarting record (this is an index, not time)
limitintHow many records to return (max: 1000)
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<ICompetition>>
A Task<TResult> representing the async operation
Remarks
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.
GetLiveSportEventsAsync(CultureInfo)
Asynchronously gets a IEnumerable<T> representing currently live sport events in the language specified by culture
Task<IEnumerable<ICompetition>> GetLiveSportEventsAsync(CultureInfo culture = null)
Parameters
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<ICompetition>>
A Task<TResult> representing the async operation
GetLotteriesAsync(CultureInfo)
Gets the list of available lotteries
Task<IEnumerable<ILottery>> GetLotteriesAsync(CultureInfo culture = null)
Parameters
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<ILottery>>
A list of available lotteries
GetPeriodStatusesAsync(Urn, CultureInfo, IEnumerable<Urn>, IEnumerable<int>)
Get sport event period summary as an asynchronous operation
Task<IEnumerable<IPeriodStatus>> GetPeriodStatusesAsync(Urn id, CultureInfo culture = null, IEnumerable<Urn> competitorIds = null, IEnumerable<int> periods = null)
Parameters
idUrnThe id of the sport event to be fetched
cultureCultureInfoThe language to be fetched
competitorIdsIEnumerable<Urn>The list of competitor ids to fetch the results for
periodsIEnumerable<int>The list of period ids to fetch the results for
Returns
- Task<IEnumerable<IPeriodStatus>>
The period statuses or empty if not found
GetPlayerProfileAsync(Urn, CultureInfo)
Asynchronously gets a IPlayerProfile
Task<IPlayerProfile> GetPlayerProfileAsync(Urn id, CultureInfo culture = null)
Parameters
idUrnA Urn specifying the id for which IPlayerProfile to be retrieved
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IPlayerProfile>
A IPlayerProfile representing the specified player or a null reference
GetResultChangesAsync(CultureInfo)
Gets the list of all results that have changed in the last 24 hours
Task<IEnumerable<IResultChange>> GetResultChangesAsync(CultureInfo culture = null)
Parameters
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<IResultChange>>
A list of all results that have changed in the last 24 hours
GetResultChangesAsync(DateTime?, Urn, CultureInfo)
Gets the list of all results that have changed in the last 24 hours
Task<IEnumerable<IResultChange>> GetResultChangesAsync(DateTime? after, Urn sportId, CultureInfo culture = null)
Parameters
afterDateTime?A DateTime specifying the starting date and time for filtering
sportIdUrnA Urn specifying the sport for which the fixtures should be returned
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<IResultChange>>
A list of all results that have changed in the last 24 hours
GetSportAsync(Urn, CultureInfo)
Asynchronously gets a ISport instance representing the sport specified by it's id in the language specified by culture, or a null reference if sport with specified id does not exist
Task<ISport> GetSportAsync(Urn id, CultureInfo culture = null)
Parameters
idUrnA Urn identifying the sport to retrieve.
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<ISport>
A Task<TResult> representing the async operation
GetSportEvent(Urn, Urn, CultureInfo)
Gets a ISportEvent derived class representing the specified sport event in language specified by culture or a null reference if the sport event with
specified id does not exist
ISportEvent GetSportEvent(Urn id, Urn sportId = null, CultureInfo culture = null)
Parameters
idUrnA Urn specifying the sport event to retrieve
sportIdUrnA Urn of the sport this event belongs to
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- ISportEvent
A ISportEvent derived class representing the specified sport event or a null reference if the requested sport event does not exist
GetSportEventStatusAsync(Urn)
Asynchronously gets a ICompetitionStatus for specific sport event
Task<ICompetitionStatus> GetSportEventStatusAsync(Urn id)
Parameters
idUrnA Urn specifying the event for which ICompetitionStatus to be retrieved
Returns
- Task<ICompetitionStatus>
A Task<TResult> representing the async operation
GetSportEventsByDateAsync(DateTime, CultureInfo)
Asynchronously gets a IEnumerable<T> representing sport events scheduled for date specified by date in language specified by culture
Task<IEnumerable<ICompetition>> GetSportEventsByDateAsync(DateTime scheduleDate, CultureInfo culture = null)
Parameters
scheduleDateDateTimeA DateTime specifying the day for which to retrieve the schedule
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<ICompetition>>
A Task<TResult> representing the async operation
GetSportsAsync(CultureInfo)
Asynchronously gets a IEnumerable<T> representing all available sports in language specified by the culture
Task<IEnumerable<ISport>> GetSportsAsync(CultureInfo culture = null)
Parameters
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- Task<IEnumerable<ISport>>
A Task<TResult> representing the async operation
GetTimelineEventsAsync(Urn, CultureInfo)
Get the associated event timeline for a single culture
Task<IEnumerable<ITimelineEvent>> GetTimelineEventsAsync(Urn sportEventId, CultureInfo culture = null)
Parameters
sportEventIdUrnThe id of the sport event to be fetched
cultureCultureInfoThe language to be fetched
Returns
- Task<IEnumerable<ITimelineEvent>>
The event timeline or empty if not found
GetTournament(Urn, CultureInfo)
Gets a ILongTermEvent representing the specified tournament in language specified by culture or a null reference if the tournament with
specified id does not exist
ILongTermEvent GetTournament(Urn id, CultureInfo culture = null)
Parameters
idUrnA Urn specifying the tournament to retrieve
cultureCultureInfoA CultureInfo specifying the language or a null reference to use the languages specified in the configuration
Returns
- ILongTermEvent
A ILongTermEvent representing the specified tournament or a null reference if requested tournament does not exist