UNPKG

iracing-api

Version:

Javascript client for iracing API

23 lines (22 loc) 843 B
import { API } from './api'; /** * Provides methods for interacting with team-related endpoints. */ export class TeamAPI extends API { constructor() { super(...arguments); /** * Get detailed information about a specific team. * * @param {GetTeamDataParams} params - Parameters for the request. * @param {number} params.teamId - The ID of the team to retrieve. * @param {boolean} [params.includeLicenses=false] - Include license information for members (can slow down response). * * @returns A promise resolving to the team data, or undefined on error. */ this.getTeamData = async (params) => await this._getData('data/team/get', { team_id: params.teamId, include_licenses: params.includeLicenses, }); } }