Skip to content

Latest commit

 

History

History
140 lines (93 loc) · 3.36 KB

File metadata and controls

140 lines (93 loc) · 3.36 KB

CarApi

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

Method HTTP request Description
getCar GET /data/car/get
getCarAssets GET /data/car/assets

getCar

IracingAPIResponse getCar()

Example

import {
  Configuration,
  CarApi,
} from '@iracing-data/api-client-fetch';
import type { GetCarRequest } 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 CarApi(config);

  try {
    const data = await api.getCar();
    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]

getCarAssets

IracingAPIResponse getCarAssets()

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

Example

import {
  Configuration,
  CarApi,
} from '@iracing-data/api-client-fetch';
import type { GetCarAssetsRequest } 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 CarApi(config);

  try {
    const data = await api.getCarAssets();
    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]