Skip to content

Latest commit

 

History

History
149 lines (101 loc) · 3.8 KB

File metadata and controls

149 lines (101 loc) · 3.8 KB

TeamApi

All URIs are relative to https://members-ng.iracing.com

Method HTTP request Description
getTeam GET /data/team/get
getTeamMembership GET /data/team/membership

getTeam

IracingAPIResponse getTeam(team_id, include_licenses)

Example

import {
  Configuration,
  TeamApi,
} from '@iracing-data/api-client-fetch';
import type { GetTeamRequest } from '@iracing-data/api-client-fetch';

async function example() {
  console.log("🚀 Testing @iracing-data/api-client-fetch SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearerAuth
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new TeamApi(config);

  const body = {
    // number
    team_id: 8.14,
    // boolean | For faster responses, only request when necessary. (optional)
    include_licenses: true,
  } satisfies GetTeamRequest;

  try {
    const data = await api.getTeam(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
team_id number [Defaults to undefined]
include_licenses boolean For faster responses, only request when necessary. [Optional] [Defaults to undefined]

Return type

IracingAPIResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
401 Access token is missing or invalid. -
429 Rate limited * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
503 Maintenance -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamMembership

IracingAPIResponse getTeamMembership()

Example

import {
  Configuration,
  TeamApi,
} from '@iracing-data/api-client-fetch';
import type { GetTeamMembershipRequest } from '@iracing-data/api-client-fetch';

async function example() {
  console.log("🚀 Testing @iracing-data/api-client-fetch SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearerAuth
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new TeamApi(config);

  try {
    const data = await api.getTeamMembership();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

This endpoint does not need any parameter.

Return type

IracingAPIResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
401 Access token is missing or invalid. -
429 Rate limited * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
503 Maintenance -

[Back to top] [Back to API list] [Back to Model list] [Back to README]