trade360-nodejs-sdk
Version:
LSports Trade360 SDK for Node.js
102 lines (101 loc) • 6.08 kB
TypeScript
import { IHttpServiceConfig, IMapper } from '../../common';
import { PreMatchSnapshotApiClient } from '../../snapshot-api/interfaces';
import { BaseHttpClient } from '../../base-http-client/index.js';
import { GetEventsResultElement, GetFixtureMarketsResultElement, GetFixturesResultElement, GetLivescoreResultElement, GetOutrightEventsResultElement, GetOutrightFixtureMarketsResultElement, GetOutrightFixtureResultElement, GetOutrightLeagueMarketsResultElement, GetOutrightLeaguesResultElement, GetOutrightScoresResultElement } from '../../common/snapshot/responses';
import { GetFixtureRequestDto, GetEventRequestDto, GetLivescoreRequestDto, GetMarketRequestDto, GetOutrightEventRequestDto, GetOutrightFixtureRequestDto, GetOutrightLeagueMarketRequestDto, GetOutrightLeaguesRequestDto, GetOutrightLivescoreRequestDto, GetOutrightMarketRequestDto } 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 PreMatchSnapshotApiClientImplementation extends BaseHttpClient implements PreMatchSnapshotApiClient {
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: GetEventRequestDto): Promise<GetEventsResultElement | undefined>;
/**
* Sends a request to the snapshot API to get outright events.
* @param requestDto The request DTO for getting outright events.
* @returns A promise that resolves to a
* GetOutrightEventsResultElement object containing the outright events information.
*/
getOutrightEvents(requestDto: GetOutrightEventRequestDto): Promise<GetOutrightEventsResultElement | undefined>;
/**
* Sends a request to the snapshot API to get outright fixtures.
* @param requestDto The request DTO for getting outright fixtures.
* @returns A promise that resolves to a
* GetOutrightFixtureResultElement object containing the outright fixtures information.
*/
getOutrightFixtures(requestDto: GetOutrightFixtureRequestDto): Promise<GetOutrightFixtureResultElement | undefined>;
/**
* Sends a request to the snapshot API to get outright scores.
* @param requestDto The request DTO for getting outright scores.
* @returns A promise that resolves to a
* GetOutrightScoresResultElement object containing the outright scores information.
*/
getOutrightScores(requestDto: GetOutrightLivescoreRequestDto): Promise<GetOutrightScoresResultElement | undefined>;
/**
* Sends a request to the snapshot API to get outright fixture markets.
* @param requestDto The request DTO for getting outright fixture markets.
* @returns A promise that resolves to a
* GetOutrightFixtureMarketsResultElement object containing the outright fixture markets information.
*/
getOutrightFixtureMarkets(requestDto: GetOutrightMarketRequestDto): Promise<GetOutrightFixtureMarketsResultElement | 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>;
}