hkjc-api
Version:
Node.js package for communicating with HKJC GraphQL API
39 lines (38 loc) • 1.5 kB
TypeScript
import { HKJCClient } from '../client';
import { FootballMatch, FootballOddsType } from '../types/football';
export interface FootballMatchesOptions {
startDate?: string | null;
endDate?: string | null;
tournIds?: string[] | null;
matchIds?: string[] | null;
oddsTypes?: FootballOddsType[];
featuredMatchesOnly?: boolean;
frontEndIds?: string[] | null;
earlySettlementOnly?: boolean;
showAllMatch?: boolean;
startIndex?: number | null;
endIndex?: number | null;
}
export declare class FootballAPI {
private client;
constructor(client?: HKJCClient);
/**
* Get all football matches with associated odds
* @param options Optional parameters to filter matches
* @returns A list of football matches
*/
getAllFootballMatches(options?: FootballMatchesOptions): Promise<FootballMatch[]>;
/**
* Get detailed information for a specific football match
* @param matchId The ID of the match to retrieve
* @param oddsTypes The types of odds to retrieve for the match
* @returns Detailed information for the specified match
*/
getFootballMatchDetails(matchId: string, oddsTypes?: FootballOddsType[]): Promise<FootballMatch | null>;
/**
* Get running match data using the specific running query
* @param matchId Single match ID (string or number)
* @returns Football match data using the running query
*/
getRunningMatch(matchId: string | number): Promise<FootballMatch[]>;
}