UNPKG

hkjc-api

Version:

Node.js package for communicating with HKJC GraphQL API

26 lines (25 loc) 1.33 kB
import { HKJCClient } from '../client'; import { RaceMeeting, Race } from '../types/horseRacing'; export type OddsType = 'WIN' | 'PLA' | 'QIN' | 'QPL' | 'CWA' | 'CWB' | 'CWC' | 'IWN' | 'FCT' | 'TCE' | 'TRI' | 'FF' | 'QTT' | 'DBL' | 'TBL' | 'DT' | 'TT' | 'SixUP'; export declare class HorseRacingAPI { private client; constructor(client?: HKJCClient); private getRaceMeetings; getActiveMeetings(): Promise<RaceMeeting[]>; getRace(raceNumber?: number): Promise<Race | null>; getAllRaces(): Promise<RaceMeeting[]>; /** * Gets the detailed odds information for a specific race * @param raceNumber The race number to get odds for (defaults to 1) * @param oddsTypes Array of odds types to retrieve (defaults to WIN and PLA) * @returns An array of odds details for the specified race and odds types */ getRaceOdds(raceNumber?: number, oddsTypes?: OddsType[]): Promise<any[]>; /** * Gets the pool investment information for a specific race * @param raceNumber The race number to get pool info for (defaults to 1) * @param oddsTypes Array of odds types to retrieve (defaults to WIN and PLA) * @returns An array of pool information for the specified race and odds types */ getRacePools(raceNumber?: number, oddsTypes?: OddsType[]): Promise<any[]>; }