iracing-api
v0.4.4
Published
Javascript client for iracing API
Downloads
76
Maintainers
Readme
iracing-api
Installation
npm install iracing-api
yarn add iracing-api
pnpm i iracing-api
bun i iracing-api
Basic Usage
import IracingAPI from 'iracing-api'
const irUser = '[email protected]'
const irPass = 'BAR'
const main = async () => {
const ir = new IracingAPI()
// First you have to login to iracing using your credentials to be able to use the API.
await ir.login(irUser, irPass)
// Now you can use any endpoint, e.g. getCars
const cars = await ir.car.getCars()
console.log(cars)
}
main().then(() => 'Done')