Season API
All methods in the Season
API are available through the season
property of the iRacingAPI
instance.
List
Get the seasons.
ts
const seasons = await ir.season.getSeasonList(params);
Available parameters:
seasonYear: number
- The season year to get the seasons for.seasonQuarter: number
- The season quarter to get the seasons for.
https://members-ng.iracing.com/data/season/list
Race Guide
Get the season race guide.
ts
const raceGuide = await ir.season.getSeasonRaceGuide(params);
Available parameters:
from?: string
- The start dateISO-8601
offset format.- Defaults to the current time.
- Include sessions with start times up to 3 hours after this time.
- Times in the past will be rewritten to the current time.
includeEndAfterFrom?: boolean
- Include sessions which start beforefrom
but end after.
https://members-ng.iracing.com/data/season/race_guide
Spectator Subsession Ids
Get the season spectator subsession ids.
ts
const spectatorSubsessionIds = await ir.season.getSpectatorSubsessionIds(params);
Available parameters:
eventTypes?: number[]
- Types of events to include in the search.- Defaults to all.
https://members-ng.iracing.com/data/season/spectator_subsession_ids