UNPKG

trade360-nodejs-sdk

Version:
81 lines (80 loc) 4.67 kB
import { IHttpServiceConfig, IMapper } from '../../common'; import { InPlaySnapshotApiClient } from '../../snapshot-api/interfaces'; import { BaseHttpClient } from '../../base-http-client'; import { GetEventsResultElement, GetFixtureMarketsResultElement, GetFixturesResultElement, GetLivescoreResultElement, GetOutrightLeaguesResultElement, GetOutrightLeagueMarketsResultElement, GetOutrightLeagueEventsResultElement } from '../../common/snapshot/responses'; import { GetFixtureRequestDto, GetInPlayEventRequestDto, GetLivescoreRequestDto, GetMarketRequestDto, GetOutrightLeaguesRequestDto, GetOutrightLeagueMarketRequestDto, GetOutrightLeagueEventsRequestDto } from '../../common/snapshot/dtos'; /** * MetadataHttpClient class is responsible for sending requests * to the metadata API. It extends the BaseHttpClient class and * contains the logic for sending requests to the metadata API. * @param packageCredentials The package credentials for the API * @param snapshotApiBaseUrl The base URL of the snapshot API * @param logger The logger instance * @param mapper The mapper instance * @returns MetadataHttpClient instance that is responsible for * sending requests to the metadata API. * @extends BaseHttpClient class for sending requests to the * customers API. * @implements IMetadataHttpClient interface for sending * requests to the metadata API. * @see BaseHttpClient class for sending requests to the * customers API. * @see IMetadataHttpClient interface for sending requests to * the metadata API. * @see IHttpServiceConfig interface for the configuration of * the HTTP service. */ export declare class InPlaySnapshotApiClientImplementation extends BaseHttpClient implements InPlaySnapshotApiClient { private readonly mapper; constructor({ packageCredentials, restApiBaseUrl, logger }: IHttpServiceConfig, mapper: IMapper); /** * Sends a request to the snapshot API to get fixtures. * @param requestDto The request DTO for getting fixtures. * @returns A promise that resolves to a * GetFixturesResultElement object containing the fixtures information. */ getFixtures(requestDto: GetFixtureRequestDto): Promise<GetFixturesResultElement | undefined>; /** * Sends a request to the snapshot API to get livescores. * @param requestDto The request DTO for getting livescores. * @returns A promise that resolves to a * GetLivescoreResultElement object containing the livescores information. */ getLivescores(requestDto: GetLivescoreRequestDto): Promise<GetLivescoreResultElement | undefined>; /** * Sends a request to the snapshot API to get fixtures markets. * @param requestDto The request DTO for getting fixtures markets. * @returns A promise that resolves to a * GetFixtureMarketsResultElement object containing the fixtures * markets information. */ getFixtureMarkets(requestDto: GetMarketRequestDto): Promise<GetFixtureMarketsResultElement | undefined>; /** * Sends a request to the snapshot API to get events. * @param requestDto The request DTO for getting events. * @returns A promise that resolves to a * GetEventsResultElement object containing the events information. */ getEvents(requestDto: GetInPlayEventRequestDto): Promise<GetEventsResultElement | undefined>; /** * Sends a request to the snapshot API to get outright leagues. * @param requestDto The request DTO for getting outright leagues. * @returns A promise that resolves to a * GetOutrightLeaguesResultElement object containing the outright leagues information. */ getOutrightLeagues(requestDto: GetOutrightLeaguesRequestDto): Promise<GetOutrightLeaguesResultElement | undefined>; /** * Sends a request to the snapshot API to get outright league markets. * @param requestDto The request DTO for getting outright leagues markets. * @returns A promise that resolves to a * GetOutrightLeagueMarketsResultElement object containing the outright leagues markets information. */ getOutrightLeagueMarkets(requestDto: GetOutrightLeagueMarketRequestDto): Promise<GetOutrightLeagueMarketsResultElement | undefined>; /** * Sends a request to the snapshot API to get outright league events. * @param requestDto The request DTO for getting outright league events. * @returns A promise that resolves to an array of * GetOutrightLeagueEventsResultElement objects containing the outright league events information. */ getOutrightLeagueEvents(requestDto: GetOutrightLeagueEventsRequestDto): Promise<GetOutrightLeagueEventsResultElement | undefined>; }