Skip to content

Latest commit

 

History

History
1075 lines (718 loc) · 61.7 KB

docs.md

File metadata and controls

1075 lines (718 loc) · 61.7 KB

IRacingSDK

Represents the iRacing SDK for interacting with the iRacing API.

Kind: global class

getCarAssets()

Function that will grab the assets of the cars on the service.

NOTE: Image paths are relative to https://images-static.iracing.com/ so you will need to append the links for the data you want to the URL

getAllCars()

Function that will fetch each car available on the service

getCarClassData()

Function that will grab car class data.

getConstants()

Function that will grab all the constants available on the API

Required Params:

Param Description
constant

The type of session to retrieve. Will be one of the following:

  • categories
  • divisons
  • event_types
  • <>

    getHostedSessions(session_type, package_id)

    Function to retrieve hosted sessions.

    Example:

    const hostedSessions = await iRacingSDK.getHostedSessions(session_type: "sessions") // Return all hosted sessions
    or
    const hostedSessions = await iRacingSDK.getHostedSessions(session_type: "combined_sessions", package_id: 1) // Get hosted sessions for a specific package ID
    

    Required Params:

    Param Type Description
    session_type string

    The type of session to retrieve.

    • sessions: Returns all sessions that can be joined as a driver, excluding spectator and non-league pending sessions for the user.
    • combined_sessions: Returns sessions that can be joined as a driver or spectator, including non-league pending sessions for the user.

    Optional Params:

    Param Type Description
    package_id number

    Can only be used with "combined_sessions" for the session type. If set, returns only sessions using this car or track package ID (per the official API docs).

    getCustLeagueSessions(mine, package_id)

    Function to retrieve hosted sessions.

    Example:

    const sessions = iRacingSDK.getCustLeagueSessions({ mine: true }) // Returns only sessions created by the user
    or
    const sessions = iRacingSDK.getCustLeagueSessions({ }) // Returns all league sessions
    

    Optional Params:

    Param Type Description
    mine boolean

    If true, returns only sessions created by the user.

    package_id number

    If set, returns only sessions using this car or track package ID (per the official API docs).

    getLeagueDirectory()

    Retrieve league directory info containing provided parameters.

    Example:

    iRacingSDK.getLeagueDirectory({})  // Returns all leagues
    or
    iRacingSDK.getLeagueDirectory({ search: "NASCAR"}) // Returns all leagues with "NASCAR" in the name, description, owner, or league ID.
    

    Optional Params:

    Param Type Description
    search number Will search against league name, description, owner, and league ID.
    tag boolean One or more tags, comma-separated
    restrict_to_member boolean If true include only leagues for which customer is a member.
    restrict_to_recruiting boolean If true include only leagues which are recruiting.
    restrict_to_friends boolean If true include only leagues owned by a friend.
    restrict_to_watched boolean If true include only leagues owned by a watched member.
    minimum_roster_count number If set include leagues with at least this number of members
    maximum_roster_count number If set include leagues with no more than this number of members.
    lowerbound number First row of results to return. Defaults to 1.
    upperbound number Last row of results to results to lowerbound + 39.

    getLeagueById(league_id, include_licenses)

    Retrieve a specific league by league ID.

    Example:

    iRacingSDK.getSpecificLeague({ league_id: 12345 }) // Returns the league with the ID of 12345
    

    Required Params:

    Param Type Description
    league_id number

    The ID of the league you want to retrieve.

    Optional Params:

    Optional Params:

    Param Type Description
    include_licenses boolean

    For faster responses, only request when necessary. Return licenses for each member.

    getLeaguePointSystem(league_id, season_id)

    Retrieve a specific league by league ID.

    Example:

    iRacingSDK.getLeaguePointSystem({ league_id: 12345 }) // Returns the league with the ID of 12345
    or 
    iRacingSDK.getLeaguePointSystem({ league_id: 12345, season_id: 12345 }) // Returns the league with the ID of 12345 and the season with the ID of 12345
    

    Required Params:

    Param Type Description
    league_id number

    The ID of the league you want to retrieve.

    Optional Params:

    Optional Params:

    Param Type Description
    season_id number

    If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned.

    getLeagueMemberships(cust_id, include_league)

    Retrieve a list of leagues the user owns (if league is not set to private).

    Example:

    iRacingSDK.getLeagueMemberships({ cust_id: 12345, include_league: true }) // Returns the leagues customer 12345 if the owner of if not set to private
    

    Required Params:

    Param Type Description
    cust_id number

    If different from the authenticated member, the following resrictions apply:

    • Caller cannot be on requested customer's block list or an empty list will result;
    • Requested customer cannot have their online activity prefrence set to hidden or an empty list will result;
    • Only leagues for which the requested customer is an admin and the league roster is not private are returned

    Optional Params:

    Param Type Description
    include_league boolean

    If true, includes the league information in the response.

    getLeagueRoster(league_id, include_licenses)

    Retrieve a leagues roster list.

    Example:

    iRacingSDK.getLeagueRoster({ league_id: 12345 }) // Returns the roster for the league with the ID of 12345
    

    Required Params:

    Param Type Description
    league_id number

    The ID of the league you want to retrieve the roster for.

    Optional Params:

    Param Type Description
    include_licenses boolean

    For faster responses, only request when necessary.

    getLeagueSeasons(league_id, retired)

    Retrieve the past and current seasons for a specific league.

    Example:

    iRacingSDK.getLeagueSeasons({ league_id: 12345 }) // Returns the seasons for the league with the ID of 12345
    

    Required Params:

    Param Type Description
    league_id number The ID of the league you want to retrieve the seasons for.

    Optional Params:

    Param Type Description
    retired boolean If true, include retired seasons.

    getLeagueSeasonStandings(league_id, season_id, car_class_id, car_id)

    Retrieve the standings for a specific league and season.

    Example:

    iRacingSDK.getLeagueSeasonStandings({ league_id: 12345 }) // Returns the sessions for the league with the ID of 12345
    

    Required Params:

    Param Type Description
    league_id number

    The ID of the league you want to retrieve the sessions for.

    season_id number

    The ID of the season you want to retrieve the sessions for.

    Optional Params:

    Param Type Description
    car_class_id number

    The ID of the car class

    car_id number

    If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes.

    getLeagueSeasonSessions(league_id, season_id, results_only)

    Retrieve each session in a season for a specific league.

    Example:

    iRacingSDK.getLeagueSeasonSessions({ league_id: 12345, season_id: 12345 }) // Returns the sessions for the league with the ID of 12345
    

    Required Params:

    Param Type Description
    league_id number The ID of the league you want to retrieve the sessions for.
    season_id number The ID of the season you want to retrieve the sessions for.

    Required Params:

    Param Type Description
    results_only boolean If true, include only sessions for which results are available.

    lookupClubHistory(season_year:, season_quarter:)

    Return the different clubs available on the service. Returns an earlier history if requirested quarter does not have a club history.

    Example:

    iRacingSDK.lookupClubHistory({ season_year: 2021, season_quarter: 1 }) // Returns club history for 2021S1
    

    Required Params:

    Param Description
    season_year: The year of the season you want to look up
    season_quarter: The quarter of the season you want to look up

    lookupCountries()

    Return the countries and their codes available on the service.

    Example:

    iRacingSDK.lookupCountries() // Returns all countries and their codes
    

    lookupDrivers(cust_id, league_id)

    Return the driver on the service with the given customer_id (search_term).

    Example:

    iRacingSDK.lookupDrivers({search_term: 123456})
    or
    iRacingSDK.lookupDrivers({search_term: "Richard Bobby"})
    

    Required Params:

    Param Description
    cust_id The customer_id of the driver you want to look up.

    Optional Params:

    Param Description
    league_id ID of the league you want to search in. Narrows the search to the roster of the given league.

    getMemberAwards(cust_id:)

    Return a list of awards for a specific member. If no cust_id is provided, the function will return the awards for the authenticated user.

    Example:

    iRacingSDK.getMemberAwards({ cust_id: 12345 })
    

    Optional Params:

    Param Description
    cust_id: The member ID of the user to retrieve awards for. If none is provided, data will be grabbed for the authenticated member.

    getMemberChartData(category_id, chart_type, cust_id)

    Retrieve the chart data for a member. If no cust_is is provided, the function will return the chart data for the authenticated user.

    Example:

    iRacingSDK.getMemberChartData({ cust_id: 12345, category_id: 1, chart_type: '1' })
    

    Required Params:

    Param Description
    category_id

    The category ID of the chart data to retrieve.

    • 1 - Oval
    • 2 - Road
    • 3 - Dirt oval
    • 4 - Dirt road

    chart_type

    The type of chart data to retrieve.

    • 1 - iRating
    • 2 - TT Rating
    • 3 - License/SR

    Optional Params:

    Param Description
    cust_id The member ID of the user to retrieve chart data for.

    getMemberData(cust_ids, included_licenses)

    Retrieve the club data for a member. If no cust_id is provided, the function will return the club data for the authenticated user.

    Example:

    iRacingSDK.getMemberData({ cust_ids: "693109, 82554" }) // Returns club data for the specified members
    

    Required Params:

    Param Description
    cust_ids: The member ID of the user to retrieve club data for. (ie. "123456, 12345" for multiple ids, or "123456" for a single id)

    Optional Params:

    Param Description
    included_licenses: Whether or not to include license data in the response. Defaults to false.

    getPersonalInfo()

    Retrieve personal info.

    Example:

    iRacingSDK.getPersonalInfo()
    

    getPersonalParticipationCredits()

    Retrieve personal participation credit data. Participation credits are rewarded for participating in certain licensed series and are awarded at the end of each season.

    Example Usage:

    iRacingSDK.getPersonalParticipationCredits()
    

    getMemberProfile(cust_id)

    Retrieve the specific member's profile. If no cust_id is provided, defaults to the authenticated user.

    Example:

    iRacingSDK.getMemberProfile({cust_id: 12345}) // Returns the profile for the specified member
    

    Optional Params:

    Param Description
    cust_id: The member ID of the user to retrieve profile data for. Defaults to the authenticated member.

    getResults(subsession_id, included_licenses)

    Get the results of a subsession, if authorized to view them. series_logo image paths are relative to https://images-static.iracing.com/img/logos/series/

    Example:

    iRacingSDK.getResults({subsession_id: 12345, included_licenses: true}) // Returns the results of the subsession.
    

    Required Params:

    Param Description
    subsession_id The ID of the subsession to get results for.

    Optional Params:

    Param Description
    included_licenses Whether or not to include license data in the response.

    getEventLog(subsession_id, simsession_number)

    Get the event log of the provided subsession.

    Example:

    iRacingSDK.getEventLog({subsession_id: 12345, simsession_number: 0}) // Returns the event log for the subsession.
    

    Required Params:

    Param Description
    subsession_id The ID of the subsession to get the event log for.
    simsession_number The simsession number to get the event log for. The main event is 0; the preceding event is -1, and so on.

    getLapChartData(subsession_id, simsession_number)

    Get the lap chart data for the provided subsession.

    Example:

    iRacingSDK.getLapChartData({subsession_id: 12345, simsession_number: 0}) // Returns the lap chart data
    

    Required Params:

    Param Description
    subsession_id The ID of the subsession to get the event log for.
    simsession_number The simsession number to get the event log for. The main event is 0; the preceding event is -1, and so on.

    getLapData(subsession_id, simsession_number, cust_id, team_id)

    Get the lap data for the provided subsession.

    Example:

    iRacingSDK.getLapData({subsession_id: 12345, simsession_number: 0, cust_id: 123456}) // Returns the lap chart data
    

    Required Params:

    Param Description
    subsession_id The ID of the subsession to get the event log for.
    simsession_number The simsession number to get the event log for. The main event is 0; the preceding event is -1, and so on.

    Optional Params:

    Param Description
    cust_id Required if the subsession was a single-driver event. Optional for team events. Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included.
    team_id Required if subsession was a team event

    getHostedSearchResults(cust_id, team_id, host_cust_id, session_name, start_range_begin, start_range_end, finish_range_begin, finish_range_end, league_id, league_session_id, car_id, track_id, category_ids)

    Hosted session search results. One of the primary filters needs to be included. Primary filters include host, driver, team, or session name.

    Maximum time frame of 90 days. Results split into one or more files with chunks of results.

    For scraping results the most effective approach is to keep track of the maximum end_time found during a search then make the subsequent call using that date/time as the finish_range_begin and skip any subsessions that are duplicated. Results are ordered by subsessionid which is a proxy for start time.

    Requires one of:

    • start_range_begin
    • finish_range_begin

    and one of:

    • cust_id
    • team_id
    • host_cust_id
    • session_name

    Example:

    // Returns hosted session data for the host with customer ID 345352.
    iRacingSDK.getHostedSearchResults({
       host_cust_id: 345352,
       start_range_begin: "2024-03-31T00:00:00Z",
       start_range_end: "2024-04-01T00:00:00Z",
       finish_range_begin: "2024-03-31T00:00:00Z",
       finish_range_end: "2024-04-01T00:00:00Z",
    })
    

    Required Params (One of the following is required):

    Param Description
    cust_id Include only sessions in which this customer participated. Ignored if team_id is supplied.
    team_id Include only sessions in which this team participated. Takes priority over cust_id if both are supplied.
    host_cust_id The host's customer ID.
    session_name Part or all of the session's name.

    <>Optional Params:
    start_range_begin Session start times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z".
    start_range_end ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.
    finish_range_begin Session finish times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z".
    finish_range_end ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.
    league_id Include only sessions for this league.
    league_session_id Include only sessions for the league session with this ID.
    car_id One of the cars used by the session.
    track_id The ID of the track used by the session.
    category_ids License categories to include in the search. Defaults to all. (ex. ?category_ids=1,2,3,4)

    getSeriesSearchResults(season_year, season_quarter, cust_id, team_id, start_range_begin, start_range_end, finish_range_begin, finish_range_end, series_id, race_week_num, official_only, event_types, category_ids)

    Official series search. Maximum time frame of 90 days. Results split into one or more files with chunks of results.

    This request can take a bit of time to process and return the link to the results. A recommendation would be to make the URL yourself, and then use the link to get the data to verify that the data is what you are looking for.

    For scraping results, the most effective approach is to keep track of the maximum end_time found during a search then make the subsequent call using that date/time as the finish_range_begin and skip any subsessions that are duplicated. Results are ordered by subsessionid which is a proxy for start time but groups together multiple splits of a series when multiple series launch sessions at the same time. Requires at least one of: season_year and season_quarter, start_range_begin, finish_range_begin.

    Example:

    // Returns all session data for customer 123456 in the 2024 season 2nd quarter.iRacingSDK.getSeriesSearchResults({season_year: 2024, season_quarter: 2, cust_id: 123456})
    

    Required Params:

    Param Description
    season_year The year of the season to get the event log for. Required only when using season_quarter.
    season_quarter The quarter of the year to get the event log for. Required only when using season_yea
    cust_id Include only sessions in which this customer participated. Ignored if team_id is supplied.
    team_id Include only sessions in which this team participated. Takes priority over cust_id if both are supplied.
    start_range_begin Session start times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z".
    start_range_end ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.
    finish_range_begin Session finish times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z".
    finish_range_end ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.
    series_id Include only sessions for series with this ID.
    race_week_num Include only sessions with this race week number.
    official_only If true, include only sessions earning championship points. Defaults to all.
    event_types Types of events to include in the search. Defaults to all. (ex. ?event_types=2,3,4,5)
    category_ids License categories to include in the search. Defaults to all. (ex. ?category_ids=1,2,3,4)

    getSeasonResults(season_id, event_type, race_week_num)

    Get all results for a season.

    Example:

    iRacingSDK.getSeasonResults({season_id: 4753, event_type: 5, race_week_num: 0}) // Returns the lap chart data
    

    Required Params:

    Param Description
    season_id The ID of the season to get the results for.

    Optional Params:

    Param Description
    event_type

    Restrict to one event type:

    • 2 - Practice
    • 3 - Qualify
    • 4 - Time Trial
    • 5 - Race

    race_week_num Zero based so the first race week of the season is 0.

    getSeasonList(season_year, season_quarter)

    Retrieve the list of seasons for a specific year and quarter.

    Example:

    iRacingSDK.const seasonList = await getSeasonList({ season_year: 2024, season_quarter: 1 });
    

    Required Parameters:

    Param Description
    season_year The year of the season.
    season_quarter The quarter of the season.

    getRaceGuide(from, include_end_after_from)

    Retrieve the race guide for a specific date.

    Example:

    const raceGuideData = await iRacingSDK.getRaceGuide({from: "2024-05-10T16:30:00Z", include_end_after_from: true });
    

    Optional Parameters:

    Param Description
    from ISO-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.
    include_end_after_from Include sessions which start before 'from' but end after.

    getSpectatorSubsessionIDs(event_types)

    Retrieve the spectator subsession IDs for specific event types.

    Example:

    const spectatorSubsessionIDs = await iRacingSDK.getSpectatorSubessionIDs({ event_types: [1, 2, 3] });
    

    Required Parameters:

    Param Description
    event_types An array of event types for which to retrieve spectator subsession IDs.

    getAllSeriesAssets()

    Return all the assets tied to the series.

    Image paths are relative to https://images-static.iracing.com/

    Example:

    
    const seriesAssets = await iRacingSDK.getAllSeriesAsssets()
    

    getAllSeries()

    Retrieve the general series data for all series in a season.

    This includes basic data such as (not exhaustive):

    • Category
    • Series ID
    • Series Name
    • Series Short Name

    Example:

    const series = await iRacingSDK.getAllSeries() // Return generalized series data
    

    getPastSeasons(series_id)

    Get all seasons for a series. Filter list by official:true for seasons with standings.

    Example:

    const pastSeasonData = await iRacingSDK.getPastSeasons(123) // Return past season data for series ID 123
    

    Required Parameters:

    Param Description
    series_id The series ID to get the seasons for.

    getCurrentSeasonsSeries()

    This function returns more detailed data about each series such as schedule, car classes, and track data.

    Example:

    const seriesData = await iRacingSDK.getCurrentSeasonsSeries() // Return detailed data for each series in the current season
    

    getSeriesStats()

    Get all the series offered by iRacing whether active or inactive.

    To get series and seasons for which standings should be available, filter the list by official: true.

    Example:

    const schedule = await iRacingSDK.getSeriesStats() // Return a list of series with stats
    

    getMemberBests(member_id, car_id)

    Retrieve member bests stats.

    If you want to retrieve stats for a specific car, first call should exclude car_id; use cars_driven list in return for subsequent calls.

    Example:

    const memberStats = await iRacingSDK.getMemberBests() // Return member best lap times
    

    Optional Params:

    Param Description
    member_id Defaults to the authenticated member
    car_id First call should exclude car_id; use cars_driven list in return for subsequent calls.

    getMemberCareerStats(member_id)

    Retrieve members career stats. Defaults ot the authenticated member but member_id can be passed to retrieve stats for another member.

    Example:

    const memberStats = await iRacingSDK.getMemberCareerStats() // Return member career stats
    

    Optional Params:

    Param Description
    member_id Defaults to the authenticated member

    getMemberDivisionStats(season_id, event_type)

    Retrieve member division. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Always for the authenticated member.

    Example:

    const memberDivisonStats = await iRacingSDK.getMemberDivisionStats() // Return member division stats
    

    Required Params:

    Param Description
    season_id ID of the season you want data for
    event_type

    The event type code for the division type:

    • 4 - Time Trial
    • 5 - Race

    getMemberRecap(member_id, year, quarter)

    Retrieve member recap. Defaults to the authenticated member, but member_id can be passed to retrieve stats for another member.

    Example:

    const memberRecap = await iRacingSDK.getMemberRecap() // Return member recap stats
    

    Optional Params:

    Param Description
    member_id Defaults to the authenticated member
    year Season year; if not supplied the current calendar year (UTC) is used.
    quarter Season (quarter) within the year; if not supplied the recap will be fore the entire year.

    getRecentRaces(cust_id)

    Retrieve a members recent races. Defaults to the authenticated member, but member_id can be passed to retrieve stats for another member.

    Example:

    const recentRaces = await iRacingSDK.getRecentRaces({cust_id: 123456}) // Return recent races for member 123456
    

    Optional Params:

    Param Description
    cust_id Defaults to the authenticated member

    getMemberSummary(cust_id)

    Retrieve member summary. Defaults to the authenticated member, but member_id can be passed to retrieve stats for another member.

    Example:

    const memberSummary = await iRacingSDK.getMemberSummary({cust_id: 123456}) // Return member summary for member 123456
    

    Optional Params:

    Param Description
    cust_id Defaults to the authenticated member

    getYearlyStats(cust_id)

    Retrieve member summary. Defaults to the authenticated member, but member_id can be passed to retrieve stats for another member.

    Example:

    const memberSummary = await iRacingSDK.getMemberSummary({cust_id: 123456}) // Return member summary for member 123456
    

    Optional Params:

    Param Description
    cust_id Defaults to the authenticated member

    getSeasonDriverStandings(season_id, car_class_id, club_id, division, race_week_num)

    Retrieve season driver standings. A base_download_url will be returned along with a list of chunk file names, which can be used to download the data. Simply attach the chunk file name to the base_download_url to download the file.

    Example:

    // Return season driver standings for season 1234 and car class 1234
    const seasonDriverStandings = await iRacingSDK.getSeasonDriverStandings({season_id: 4603, car_class_id: 870})
    

    Required Params:

    Param Description
    season_id ID of the season you want data for
    car_class_id ID of the car class you want data for

    Optional Params:

    Param Description
    club_id ID of the club you want data for. Defaults to all (-1).
    division Division you want data for. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.
    race_week_num Number of the race week. The first race week of a season is 0.

    getSeasonSupersessionStandings(season_id, car_class_id, club_id, division, race_week_num)

    Retrieve seasons supersession standings. A base_download_url will be returned along with a list of chunk file names, which can be used to download the data. Simply attach the chunk file name to the base_download_url to download the file.

    Example:

    // Return season driver standings for season 1234 and car class 1234
    const supersessionStandings = await iRacingSDK.getSeasonSupersesssionStandings({season_id: 1234, car_class_id: 1234})
    

    Required Params:

    Param Description
    season_id ID of the season you want data for
    car_class_id ID of the car class you want data for

    Optional Params:

    Param Description
    club_id ID of the club you want data for. Defaults to all (-1).
    division Division you want data for. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.
    race_week_num Number of the race week. The first race week of a season is 0.

    getSeasonTeamStandings(season_id, car_class_id, race_week_num)

    Retrieve season team standings. A base_download_url will be returned along with a list of chunk file names, which can be used to download the data. Simply attach the chunk file name to the base_download_url to download the file.

    Example:

    const seasonTeamStandings = await iRacingSDK.getSeasonTeamStandings({season_id: 1234, car_class_id: 123}) // Return team standings for season 1234 and car class 123
    

    Required Params:

    Param Description
    season_id ID of the season you want data for
    car_class_id ID of the car class you want data for

    Optional Params:

    Param Description
    race_week_num Number of the race week. The first race week of a season is 0.

    getSeasonTimeTrialStandings(season_id, car_class_id, club_id, division, race_week_num)

    Retrieve season time trial standings. A base_download_url will be returned along with a list of chunk file names, which can be used to download the data. Simply attach the chunk file name to the base_download_url to download the file.

    Example:

    // Return season time trial season standings for season 4603 and car class 870
    const timeTrialStandings = await iRacingSDK.getSeasonTimetrialStandings({season_id: 4603, car_class_id: 870 })
    

    Required Params:

    Param Description
    season_id ID of the season you want data for
    car_class_id ID of the car class you want data for

    Optional Params:

    Param Description
    club_id ID of the club you want data for. Defaults to all (-1).
    division Division you want data for. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.
    race_week_num Number of the race week. The first race week of a season is 0.

    getSeasonTimeTrialResults(season_id, car_class_id, race_week_num, club_id, division)

    Retrieve season time trial results. A base_download_url will be returned along with a list of chunk file names, which can be used to download the data. Simply attach the chunk file name to the base_download_url to download the file.

    Example:

    // Return time trials results for season 4603, car class 870, and race week 0
    const timetrialResults = await iRacingSDK.getSeasonTimetrialResults({season_id: 4603, car_class_id: 870, race_week_num: 0 })
    

    Required Params:

    Param Description
    season_id ID of the season you want data for
    car_class_id ID of the car class you want data for
    race_week_num Number of the race week. The first race week of a season is 0.

    Optional Params:

    Param Description
    club_id ID of the club you want data for. Defaults to all (-1).
    division Division you want data for. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.

    getSeasonQualifyingResults(season_id, car_class_id, race_week_num, club_id, division)

    Retrieve season qualifying results. A base_download_url will be returned along with a list of chunk file names, which can be used to download the data. Simply attach the chunk file name to the base_download_url to download the file.

    Example:

    // Return time trials results for season 4603, car class 870, and race week 0
    const qualfyingResults = await iRacingSDK.getSeasonQualifyingResults({season_id: 4603, car_class_id: 870, race_week_num: 0 })
    

    Required Params:

    Param Description
    season_id ID of the season you want data for
    car_class_id ID of the car class you want data for
    race_week_num Number of the race week. The first race week of a season is 0.

    Optional Params:

    Param Description
    club_id ID of the club you want data for. Defaults to all (-1).
    division Division you want data for. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.

    getWorldRecords(car_id, track_id, season_year, season_quarter)

    Retrieve world records. A base_download_url will be returned along with a list of chunk file names, which can be used to download the data. Simply attach the chunk file name to the base_download_url to download the file.

    Example:

    // Return time trials results for season 4603, car class 870, and race week 0
    const timetrialResults = await iRacingSDK.getSeasonTimetrialResults({season_id: 4603, car_class_id: 870, race_week_num: 0 })
    

    Required Params:

    Param Description
    car_id ID of the car you want world record data for
    track_id ID of the track you want data for

    Optional Params:

    Param Description
    season_year Limit best time to a given year
    season_quarter Limit best times to a given quarter; only applicable when year is used

    getTeamProfile(team_id, include_licenses)

    Function to retrieve a team's profile.

    Example:

    iRacingSDK.getTeamProfile({team_id: 12345})
    

    Required Params:

    Param Description
    team_id The team ID of the team to retrieve profile data for.

    Optional Params:

    Param Description
    include_licenses Whether or not to include license data in the response. For faster responses, only request license data when needed.

    getUserTimeAttackData(ta_comp_season_id)

    Function to retrieve an authenticated members time attack results.

    NOTE: This function has not been thorougly tested and may not work as expected.

    Example:

    iRacingSDK.getUserTimeAttackData({ta_comp_season_id: 12345})
    

    Required Params:

    Param Description
    ta_comp_season_id

    The time attack competition season ID to retrieve data for. Defaults to the authenticated member but a season_id is still needed.

    getTrackData()

    Function to retrieve all tracks available on iRacing.

    Example:

    iRacingSDK.getTrackData() // Returns an array of all tracks available on iRacing
    

    getTrackAssets()

    Function to retrieve track assets.

    Example:

    iRacingSDK.getTrackAssets() // Returns all assets for the tracks available on iRacing