iracing-api
Version:
Javascript client for iracing API
22 lines (21 loc) • 916 B
JavaScript
import { API } from './api';
/**
* Provides methods for interacting with time attack competition endpoints.
*/
export class TimeAttackAPI extends API {
constructor() {
super(...arguments);
/**
* Get the time attack season results for the **authenticated** member.
*
* @param {GetTimeAttackSeasonParams} params - Parameters for the request.
* @param {number} params.seasonId - The ID of the time attack competition season (`ta_comp_season_id`).
*
* @returns A promise resolving to the member's time attack season results, or undefined on error.
* Note: The specific type for the results array is not fully defined yet.
*/
this.getTimeAttackSeasonResults = async (params) => await this._getData('data/time_attack/member_season_results', {
ta_comp_season_id: params.seasonId,
});
}
}