@sports-sdk/ruwt
Version:
A package for interacting with the Are You Watching This?! API
1,098 lines (1,093 loc) • 23.4 kB
text/typescript
import { SportsSdkClient } from '@sports-sdk/core';
import { ZodObject } from 'zod';
declare enum RUWTSport {
/**
* Arena Football League 2
*/
af2 = "af2",
/**
* Arena Football League
*/
afl = "afl",
/**
* American Hockey League
*/
ahl = "ahl",
/**
* AFL
*/
aussiefootball = "aussiefootball",
/**
* Bowling
*/
bowling = "bowling",
/**
* Boxing
*/
boxing = "boxing",
/**
* Continental Basketball Association
*/
cba = "cba",
/**
* Canadian Football
*/
cfl = "cfl",
/**
* CHL
*/
chl = "chl",
/**
* Commonwealth Games
*/
commgames = "commgames",
/**
* Cricket
*/
cricket = "cricket",
/**
* Cycling
*/
cycling = "cycling",
/**
* ECHL
*/
echl = "echl",
/**
* esports
*/
esports = "esports",
/**
* General
*/
general = "general",
/**
* Golf
*/
golf = "golf",
/**
* Horse Racing
*/
horse = "horse",
/**
* KBO League
*/
kbo = "kbo",
/**
* Lacrosse
*/
lacrosse = "lacrosse",
/**
* Little League World Series
*/
llws = "llws",
/**
* MLB
*/
mlb = "mlb",
/**
* Mixed Martial Arts
*/
mma = "mma",
/**
* NBA
*/
nba = "nba",
/**
* NBA Development League
*/
nbdl = "nbdl",
/**
* NBL
*/
nbl = "nbl",
/**
* Men's College Basketball
*/
ncaab = "ncaab",
/**
* College Baseball
*/
ncaabaseball = "ncaabaseball",
/**
* Women's College Basketball
*/
ncaabw = "ncaabw",
/**
* College Football
*/
ncaaf = "ncaaf",
/**
* College Hockey
*/
ncaah = "ncaah",
/**
* Netball
*/
netball = "netball",
/**
* National Football League
*/
nfl = "nfl",
/**
* NFL Europa
*/
nfleuropa = "nfleuropa",
/**
* NHL
*/
nhl = "nhl",
/**
* Olympics
*/
olympics = "olympics",
/**
* Poker
*/
poker = "poker",
/**
* Auto Racing
*/
racing = "racing",
/**
* Rodeo
*/
rodeo = "rodeo",
/**
* Rugby League
*/
rugbyleague = "rugbyleague",
/**
* Rugby Union
*/
rugbyunion = "rugbyunion",
/**
* Soccer
*/
soccer = "soccer",
/**
* Tennis
*/
tennis = "tennis",
/**
* Track and Field
*/
trackandfield = "trackandfield",
/**
* UFL
*/
ufl = "ufl",
/**
* World Baseball Classic
*/
wbc = "wbc",
/**
* WNBA
*/
wnba = "wnba"
}
declare enum RUWTLeagueCode {
/**
* Australian Football League
*/
AUF = "AUF",
/**
* JLT Community Series
*/
AUFN = "AUFN",
/**
* PGA of Australia
*/
AUGA = "AUGA",
/**
* American League
*/
BBA = "BBA",
/**
* Cactus League
*/
BBC = "BBC",
/**
* College World Series Baseball
*/
BBD = "BBD",
/**
* Grapefruit League
*/
BBG = "BBG",
/**
* KBO League
*/
BBKR = "BBKR",
/**
* Major League Baseball
*/
BBM = "BBM",
/**
* National League
*/
BBN = "BBN",
/**
* World Baseball Classic
*/
BBY = "BBY",
/**
* LIV Golf
*/
BGA = "BGA",
/**
* Continental Basketball Assn
*/
BKA = "BKA",
/**
* National Basketball League
*/
BKAU = "BKAU",
/**
* Men's College Basketball
*/
BKC = "BKC",
/**
* Women's National Basketball Association
*/
BKD = "BKD",
/**
* National Basketball Developmental League
*/
BKN = "BKN",
/**
* National Basketball Association
*/
BKP = "BKP",
/**
* Women's College Basketball
*/
BKW = "BKW",
/**
* Boxing
*/
BOX = "BOX",
/**
* Commonwealth Games
*/
CMWG = "CMWG",
/**
* Internationals
*/
CRINT = "CRINT",
/**
* ODI World Cup
*/
CROWC = "CROWC",
/**
* Big Bash League
*/
CRTAU = "CRTAU",
/**
* Indian Premier League
*/
CRTIN = "CRTIN",
/**
* T20 World Cup
*/
CRTWC = "CRTWC",
/**
* Cycling
*/
CYC = "CYC",
/**
* Korn Ferry Tour
*/
DGA = "DGA",
/**
* European Golf Association
*/
EGA = "EGA",
/**
* Overwatch League
*/
ESOWL = "ESOWL",
/**
* Arena Football League
*/
FBA = "FBA",
/**
* Canadian Football League
*/
FBB = "FBB",
/**
* College Football
*/
FBC = "FBC",
/**
* Arena Football League 2
*/
FBD = "FBD",
/**
* National Football League
*/
FBP = "FBP",
/**
* UFL
*/
FBU = "FBU",
/**
* NFL Europe
*/
FBW = "FBW",
/**
* General
*/
GEN = "GEN",
/**
* American Hockey League
*/
HKA = "HKA",
/**
* Central Hockey League
*/
HKC = "HKC",
/**
* ECHL
*/
HKE = "HKE",
/**
* College Hockey
*/
HKH = "HKH",
/**
* National Hockey League
*/
HKN = "HKN",
/**
* National Lacrosse League
*/
LCN = "LCN",
/**
* Ladies Professional Golfers Association
*/
LGA = "LGA",
/**
* LLB
*/
LLB = "LLB",
/**
* Mixed Martial Arts
*/
MMA = "MMA",
/**
* Internationals
*/
NTINT = "NTINT",
/**
* ANZ Championship
*/
NTTT = "NTTT",
/**
* Netball World Cup
*/
NTWC = "NTWC",
/**
* Olympics
*/
OLY = "OLY",
/**
* Olympics Men's Soccer
*/
OLYSM = "OLYSM",
/**
* Olympics Women's Soccer
*/
OLYSW = "OLYSW",
/**
* Professional Bowlers Assn
*/
PBA = "PBA",
/**
* Professional Golfers Association
*/
PGA = "PGA",
/**
* Poker
*/
POK = "POK",
/**
* Formula 1
*/
RACF1 = "RACF1",
/**
* MotoGP
*/
RACGP = "RACGP",
/**
* IndyCar
*/
RACIN = "RACIN",
/**
* NASCAR
*/
RACNS = "RACNS",
/**
* V8 Supercars
*/
RACV8 = "RACV8",
/**
* Thoroughbred Racing
*/
RAH = "RAH",
/**
* Track And Field
*/
RAT = "RAT",
/**
* Auckland Nines
*/
RLAU9 = "RLAU9",
/**
* Super League
*/
RLEU = "RLEU",
/**
* Internationals
*/
RLINT = "RLINT",
/**
* NRL
*/
RLNRL = "RLNRL",
/**
* Rugby League World Cup
*/
RLWC = "RLWC",
/**
* Rodeo
*/
ROD = "ROD",
/**
* 6 Nations
*/
RU6N = "RU6N",
/**
* Rugby Sevens
*/
RU7 = "RU7",
/**
* Internationals
*/
RUINT = "RUINT",
/**
* Super Rugby
*/
RUSR = "RUSR",
/**
* Rugby Championship
*/
RUTRC = "RUTRC",
/**
* Rugby World Cup
*/
RUWC = "RUWC",
/**
* AFC Champions League
*/
SCAFC = "SCAFC",
/**
* UEFA Champions League
*/
SCB = "SCB",
/**
* Club World Cup
*/
SCC = "SCC",
/**
* CONCACAF Champions League
*/
SCNA = "SCNA",
/**
* UEFA Europa League
*/
SCU = "SCU",
/**
* Senior Professional Golfers Association
*/
SGA = "SGA",
/**
* UEFA European Championship
*/
SOA = "SOA",
/**
* UEFA European Championship Qualifying
*/
SOAQ = "SOAQ",
/**
* AFC Asian Cup
*/
SOASI = "SOASI",
/**
* A-League
*/
SOAUA = "SOAUA",
/**
* W-League
*/
SOAUW = "SOAUW",
/**
* Copa Soccer
*/
SOC = "SOC",
/**
* English Premier League
*/
SOE = "SOE",
/**
* FA Cup
*/
SOEFA = "SOEFA",
/**
* EFL Cup
*/
SOEFL = "SOEFL",
/**
* League One
*/
SOEL1 = "SOEL1",
/**
* League Championship
*/
SOELC = "SOELC",
/**
* Ligue 1
*/
SOF = "SOF",
/**
* Ligue 2
*/
SOF2 = "SOF2",
/**
* Bundesliga
*/
SOG = "SOG",
/**
* 2. Bundesliga
*/
SOG2 = "SOG2",
/**
* Serie A
*/
SOI = "SOI",
/**
* Serie B
*/
SOI2 = "SOI2",
/**
* International Friendlies
*/
SOINT = "SOINT",
/**
* International Friendlies
*/
SOINW = "SOINW",
/**
* Major League Soccer
*/
SOM = "SOM",
/**
* National Women's Soccer League
*/
SOMW = "SOMW",
/**
* Gold Cup
*/
SONCC = "SONCC",
/**
* Leagues Cup
*/
SONLC = "SONLC",
/**
* Argentina Soccer
*/
SOR = "SOR",
/**
* La Liga
*/
SOS = "SOS",
/**
* La Liga 2
*/
SOS2 = "SOS2",
/**
* Scottish Premiership
*/
SOSC = "SOSC",
/**
* World Cup
*/
SOW = "SOW",
/**
* Women's World Cup
*/
SOWW = "SOWW",
/**
* Mexican Soccer
*/
SOX = "SOX",
/**
* Tennis
*/
TEN = "TEN"
}
declare enum RUWTOddsProvider {
BETWAY = "BETWAY",
BET_365 = "BET_365",
BET_RIVERS_AZ = "BET_RIVERS_AZ",
BET_RIVERS_CA_ON = "BET_RIVERS_CA_ON",
BET_RIVERS_CO = "BET_RIVERS_CO",
BET_RIVERS_IA = "BET_RIVERS_IA",
BET_RIVERS_IL = "BET_RIVERS_IL",
BET_RIVERS_IN = "BET_RIVERS_IN",
BET_RIVERS_LA = "BET_RIVERS_LA",
BET_RIVERS_MD = "BET_RIVERS_MD",
BET_RIVERS_MI = "BET_RIVERS_MI",
BET_RIVERS_NY = "BET_RIVERS_NY",
BET_RIVERS_OH = "BET_RIVERS_OH",
BET_RIVERS_PA = "BET_RIVERS_PA",
BET_RIVERS_VA = "BET_RIVERS_VA",
BET_RIVERS_WV = "BET_RIVERS_WV",
CONSENSUS = "CONSENSUS",
DESERT_DIAMOND_AZ = "DESERT_DIAMOND_AZ",
DRAFTKINGS = "DRAFTKINGS",
ESPNBET = "ESPNBET",
FANDUEL = "FANDUEL",
MGM = "MGM",
SPORTS_INTERACTION = "SPORTS_INTERACTION",
SPORT_888 = "SPORT_888",
SUGAR_HOUSE_NJ = "SUGAR_HOUSE_NJ",
TIPICO = "TIPICO",
UNIBET = "UNIBET",
WILLIAM_HILL = "WILLIAM_HILL"
}
interface RequestParams {
[key: string]: any;
}
interface ResponseMetaData {
code: number;
count: number;
description: string;
}
interface RUWTResponse<T> {
meta: ResponseMetaData;
results?: Array<T>;
}
interface GamesParameters {
dateRange?: [number, number];
full?: boolean;
gameID?: number;
includePlayerProjections?: boolean;
providerAffiliation?: string;
providerCoordinates?: [number, number];
providerID?: string;
sports?: Array<RUWTSport>;
teamID?: number;
}
interface Game {
assets?: Array<GameAsset>;
attributes: Array<GameAttribute>;
competition?: string;
date: number;
gameID: number;
headline?: string;
highPoints: number;
insights?: Array<string>;
label?: string;
leagueCode: RUWTLeagueCode;
location?: string;
points: number;
pointsLevel: string;
programIDs?: Array<string>;
rationale?: string;
rotationNumber1?: number;
rotationNumber2?: number;
round?: string;
seasonSection?: string;
sport: RUWTSport;
statistics?: {
team1?: RUWTStatistics<Array<GamePlayerStatistic>>;
team2?: RUWTStatistics<Array<GamePlayerStatistic>>;
};
team1City?: string;
team1Color?: string;
team1ID?: number;
team1Initials?: string;
team1Name?: string;
team1Nickname?: string;
team1Score?: number;
team2City?: string;
team2Color?: string;
team2ID?: number;
team2Initials?: string;
team2Name?: string;
team2Nickname?: string;
team2Score?: number;
time?: number;
timeLeft?: string;
}
interface GameAsset {
assetID: number;
date: number;
description?: string;
duration?: number;
gameID: number;
pointsLevel: string;
source: string;
sport: RUWTSport;
tags?: Array<string>;
title: string;
type: string;
url: string;
}
interface GameAttribute {
data: Array<any>;
format: string;
name: string;
}
interface GamePlayerStatistic {
firstName: string;
lastName: string;
playerID: number;
position: string;
value: number;
}
interface GameOddsParameters {
gameID?: number;
history?: boolean;
provider?: RUWTOddsProvider;
q?: string;
sport?: RUWTSport;
teamID?: number;
}
interface GameOddsResult extends Game {
odds: Array<GameOdds>;
}
interface GameOdds {
date: number;
moneyLine1?: number;
moneyLine2?: number;
moneyLineTie?: number;
overUnder?: number;
overUnderLineOver?: number;
overUnderLineUnder?: number;
provider: RUWTOddsProvider;
spread?: number;
spreadLine1?: number;
spreadLine2?: number;
url?: string;
}
interface OddsSplitsParameters {
gameID?: number;
leagueCode?: RUWTLeagueCode;
sport?: RUWTSport;
teamID?: number;
}
interface OddsSplitsResult extends Game {
splits: Array<OddsSplits>;
}
/**
* Handle = Money wagered
*/
interface OddsSplits {
moneyLine1BetPercentage: number;
moneyLine1HandlePercentage: number;
moneyLine2BetPercentage: number;
moneyLine2HandlePercentage: number;
overUnderLineOverBetPercentage: number;
overUnderLineOverHandlePercentage: number;
overUnderLineUnderBetPercentage: number;
overUnderLineUnderHandlePercentage: number;
spreadLine1BetPercentage: number;
spreadLine1HandlePercentage: number;
spreadLine2BetPercentage: number;
spreadLine2HandlePercentage: number;
}
interface SideOddsParameters {
gameID?: number;
leagueCode?: RUWTLeagueCode;
playerID?: number;
q?: string;
teamID?: number;
}
interface SideOddsResponse extends RUWTResponse<SideOddsResult> {
games?: Array<Game>;
players?: Array<Player>;
teams?: Array<Team>;
}
interface Player {
birthDate: string;
country: string;
firstName: string;
height: number;
lastName: string;
number: string;
playerID: number;
position: string;
sport: RUWTSport;
teamID?: number;
weight: number;
}
interface SideOddsResult {
gameID?: number;
season: number;
sideOdds: Array<SideOdds>;
title: string;
type: string;
}
interface SideOdds {
cutoffDate?: number;
date: number;
gameID?: number;
playerID?: number;
/**
* Shown by itself for a one-option outright bet
*/
price?: number;
/**
* Yes/Over
*/
price1?: number;
/**
* No/Under
*/
price2?: number;
provider: RUWTOddsProvider;
teamID?: number;
url?: string;
/**
* Over/Under value
*/
value?: number;
}
interface PlayersParameters {
playerID?: number | string;
teamID?: number | string;
}
interface PlayerStatisticsParameters {
playerID?: number;
season?: number;
teamID?: number;
}
interface PlayerStats extends Player {
statistics: RUWTStatistics<number>;
}
interface SportsResult {
abbreviation: string;
endDate?: number;
hasField: boolean;
leagues: Array<SportsLeague>;
name: string;
showGamesByWeek: boolean;
startDate?: number;
}
interface SportsLeague {
code: RUWTLeagueCode;
endDate?: number;
name: string;
showGamesByWeek: boolean;
startDate?: number;
}
interface StandingsParameters {
leagueCode?: RUWTLeagueCode;
sport?: RUWTSport;
}
interface StandingsResult {
conference: string;
division: string;
leagueCode: RUWTLeagueCode;
teams: Array<StandingsTeam>;
}
interface StandingsTeam {
city: string;
games_behind: number;
losses: number;
name: string;
played: number;
sport: RUWTSport;
streak: number;
teamID: number;
wins: number;
wins_percentage: string;
}
interface TeamsParameters {
sport?: RUWTSport;
teamID?: number;
}
interface Team {
city: string;
color?: string;
form?: string;
initials: string;
leagueCode: RUWTLeagueCode;
losses?: number;
name?: string;
sport: RUWTSport;
teamID: number;
wins?: number;
}
interface InjuriesParameters {
gameID?: number;
playerID?: number;
sport?: RUWTSport;
teamID?: number;
}
interface PlayerInjury extends Player {
date: string;
location: string;
status: string;
}
type RUWTStatistics<T> = KnownRUWTStatistics<T> & Record<string, T>;
interface KnownRUWTStatistics<T> {
BASEBALL_BATTING_AT_BATS?: T;
BASEBALL_BATTING_DOUBLES?: T;
BASEBALL_BATTING_HITS?: T;
BASEBALL_BATTING_HOME_RUNS?: T;
BASEBALL_BATTING_RUNS?: T;
BASEBALL_BATTING_RUNS_BATTED_IN?: T;
BASEBALL_BATTING_SINGLES?: T;
BASEBALL_BATTING_STEALS?: T;
BASEBALL_BATTING_STOLEN_BASES?: T;
BASEBALL_BATTING_STRIKEOUTS?: T;
BASEBALL_BATTING_TRIPLES?: T;
BASEBALL_BATTING_WALKS?: T;
BASEBALL_PITCHING_BALLS?: T;
BASEBALL_PITCHING_BATTERS_FACED?: T;
BASEBALL_PITCHING_COMPLETE_GAME?: T;
BASEBALL_PITCHING_HITS?: T;
BASEBALL_PITCHING_HIT_BY_PITCH?: T;
BASEBALL_PITCHING_HOME_RUNS?: T;
BASEBALL_PITCHING_INNINGS_PITCHED?: T;
BASEBALL_PITCHING_PITCHES?: T;
BASEBALL_PITCHING_RUNS?: T;
BASEBALL_PITCHING_RUNS_EARNED?: T;
BASEBALL_PITCHING_STARTER?: T;
BASEBALL_PITCHING_STRIKEOUTS?: T;
BASEBALL_PITCHING_STRIKES?: T;
BASEBALL_PITCHING_STRIKES_FIRST_PITCH?: T;
BASEBALL_PITCHING_WALKS?: T;
BASKETBALL_ASSISTS?: T;
BASKETBALL_BLOCKS?: T;
BASKETBALL_FIELD_GOALS_ATTEMPTED?: T;
BASKETBALL_FIELD_GOALS_MADE?: T;
BASKETBALL_FOULS_PERSONAL?: T;
BASKETBALL_FREE_THROWS_ATTEMPTED?: T;
BASKETBALL_FREE_THROWS_MADE?: T;
BASKETBALL_MINUTES?: T;
BASKETBALL_PLUS_MINUS?: T;
BASKETBALL_POINTS?: T;
BASKETBALL_REBOUNDS_DEFENSIVE?: T;
BASKETBALL_REBOUNDS_OFFENSIVE?: T;
BASKETBALL_STARTER?: T;
BASKETBALL_STEALS?: T;
BASKETBALL_THREE_POINTERS_ATTEMPTED?: T;
BASKETBALL_THREE_POINTERS_MADE?: T;
BASKETBALL_TURNOVERS?: T;
FANTASY_POINTS?: T;
FOOTBALL_DEFENSIVE_INTERCEPTIONS?: T;
FOOTBALL_DEFENSIVE_SACKS?: T;
FOOTBALL_DEFENSIVE_TACKLES?: T;
FOOTBALL_DEFENSIVE_TACKLES_ASSISTS?: T;
FOOTBALL_DEFENSIVE_TOUCHDOWNS?: T;
FOOTBALL_FUMBLES?: T;
FOOTBALL_FUMBLES_LOST?: T;
FOOTBALL_FUMBLES_RECOVERED?: T;
FOOTBALL_KICKING_EXTRA_POINTS_ATTEMPTED?: T;
FOOTBALL_KICKING_EXTRA_POINTS_MADE?: T;
FOOTBALL_KICKING_FIELD_GOALS_ATTEMPTED?: T;
FOOTBALL_KICKING_FIELD_GOALS_LONG?: T;
FOOTBALL_KICKING_FIELD_GOALS_MADE?: T;
FOOTBALL_PASSING_ATTEMPTS?: T;
FOOTBALL_PASSING_COMPLETIONS?: T;
FOOTBALL_PASSING_INTERCEPTIONS?: T;
FOOTBALL_PASSING_LONG?: T;
FOOTBALL_PASSING_RATING?: T;
FOOTBALL_PASSING_SACKS?: T;
FOOTBALL_PASSING_SACKS_YARDS?: T;
FOOTBALL_PASSING_TOUCHDOWNS?: T;
FOOTBALL_PASSING_YARDS?: T;
FOOTBALL_PUNTING_LONG?: T;
FOOTBALL_PUNTING_PUNTS?: T;
FOOTBALL_PUNTING_TOUCHBACKS?: T;
FOOTBALL_PUNTING_YARDS?: T;
FOOTBALL_RECEIVING_LONG?: T;
FOOTBALL_RECEIVING_RECEPTIONS?: T;
FOOTBALL_RECEIVING_TARGETS?: T;
FOOTBALL_RECEIVING_TOUCHDOWNS?: T;
FOOTBALL_RECEIVING_YARDS?: T;
FOOTBALL_RECEIVING_YARDS_AFTER_CATCH?: T;
FOOTBALL_RUSHING_ATTEMPTS?: T;
FOOTBALL_RUSHING_LONG?: T;
FOOTBALL_RUSHING_TOUCHDOWNS?: T;
FOOTBALL_RUSHING_YARDS?: T;
FOOTBALL_SPECIAL_TEAMS_KICK_RETURN_ATTEMPTS?: T;
FOOTBALL_SPECIAL_TEAMS_KICK_RETURN_LONG?: T;
FOOTBALL_SPECIAL_TEAMS_KICK_RETURN_TOUCHDOWNS?: T;
FOOTBALL_SPECIAL_TEAMS_KICK_RETURN_YARDS?: T;
FOOTBALL_SPECIAL_TEAMS_PUNT_RETURN_ATTEMPTS?: T;
FOOTBALL_SPECIAL_TEAMS_PUNT_RETURN_LONG?: T;
FOOTBALL_SPECIAL_TEAMS_PUNT_RETURN_TOUCHDOWNS?: T;
FOOTBALL_SPECIAL_TEAMS_PUNT_RETURN_YARDS?: T;
HOCKEY_ASSISTS?: T;
HOCKEY_BLOCKS_MADE?: T;
HOCKEY_GOALS?: T;
HOCKEY_GOALTENDING_GOALS_ALLOWED?: T;
HOCKEY_GOALTENDING_SAVES?: T;
HOCKEY_GOALTENDING_SHOTS?: T;
HOCKEY_HITS?: T;
HOCKEY_PENALTIES?: T;
HOCKEY_PENALTIES_MINUTES?: T;
HOCKEY_PLUS_MINUS?: T;
HOCKEY_SHIFTS?: T;
HOCKEY_SHOTS?: T;
HOCKEY_SHOTS_MISSED?: T;
HOCKEY_TIME_ON_ICE_SECONDS?: T;
SOCCER_ASSISTS?: T;
SOCCER_FOULS_COMMITTED?: T;
SOCCER_GOALS?: T;
SOCCER_OFFSIDES?: T;
SOCCER_OWN_GOALS?: T;
SOCCER_RED_CARDS?: T;
SOCCER_SAVES?: T;
SOCCER_SHOTS_ON_GOAL?: T;
SOCCER_SHOTS_TOTAL?: T;
SOCCER_YELLOW_CARDS?: T;
}
declare class RUWTClient extends SportsSdkClient {
protected readonly apiKey: string;
/**
* Creates an Are You Watching This?! (RUWT) client.
* @param siteId - Your unique RUWT site id. If not provided, it will look for `RUWT_SITE_ID` in the environment variables.
* @param apiKey - The API token for authenticating API requests. If not provided, it will look for `RUWT_API_KEY` in the environment variables.
* @throws Will throw an error if the API key is not provided or found in the environment variables.
*/
constructor(siteId?: string, apiKey?: string);
/**
* Sends a GET request to the specified URL with the provided parameters.
* @param apiPath - The path to append to the URL when sending the request.
* @param additionalParams - Additional query parameters for the request.
* @param parser - Optional ZodObject to parse the response data before returning it as T
* @returns The response data from the API.
*/
protected request<T>({ apiPath, additionalParams, parser, }: {
additionalParams?: RequestParams;
apiPath: string;
parser?: ZodObject<any>;
}): Promise<T>;
getGames(parameters?: GamesParameters): Promise<RUWTResponse<Game>>;
getGameOdds(parameters?: GameOddsParameters): Promise<RUWTResponse<GameOddsResult>>;
getOddsSplits(parameters?: OddsSplitsParameters): Promise<RUWTResponse<OddsSplitsResult>>;
getSideOdds(parameters?: SideOddsParameters): Promise<SideOddsResponse>;
getPlayers(parameters: PlayersParameters): Promise<RUWTResponse<Player>>;
getPlayerStatistics(parameters: PlayerStatisticsParameters): Promise<RUWTResponse<PlayerStats>>;
getSports(): Promise<RUWTResponse<SportsResult>>;
getStandings(parameters: StandingsParameters): Promise<RUWTResponse<StandingsResult>>;
getTeams(parameters: TeamsParameters): Promise<RUWTResponse<Team>>;
getInjuries(parameters: InjuriesParameters): Promise<RUWTResponse<PlayerInjury>>;
}
export { type Game, type GameAsset, type GameAttribute, type GameOdds, type GameOddsParameters, type GameOddsResult, type GamePlayerStatistic, type GamesParameters, type InjuriesParameters, type OddsSplits, type OddsSplitsParameters, type OddsSplitsResult, type Player, type PlayerInjury, type PlayerStatisticsParameters, type PlayerStats, type PlayersParameters, RUWTClient, RUWTLeagueCode, RUWTOddsProvider, type RUWTResponse, RUWTSport, type RUWTStatistics, type RequestParams, type ResponseMetaData, type SideOdds, type SideOddsParameters, type SideOddsResponse, type SideOddsResult, type SportsLeague, type SportsResult, type StandingsParameters, type StandingsResult, type StandingsTeam, type Team, type TeamsParameters };