npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

garage61-js-client

v1.0.0

Published

A Node.js client library for the Garage61 API

Readme

Garage61 Node.js Client

A Node.js client library for the Garage61 API. This library provides a simple interface to access Garage61's motorsports data and telemetry services.

Installation

npm install garage61-js-client

Authentication

The Garage61 API requires authentication using either a Personal Access Token or OAuth2. This client library currently supports Personal Access Token authentication.

const { Garage61Client } = require('garage61-js-client');

// Initialize with your personal access token
const client = new Garage61Client('your-access-token');

Quick Examples

Get User Information

const userInfo = await client.me.getInfo();
console.log(userInfo);

Get Team Information

const teamInfo = await client.teams.getInfo('team-id');
console.log(teamInfo);

Find Laps

const laps = await client.laps.find({
  tracks: [123],  // Track IDs
  cars: [456],    // Car IDs
  limit: 10       // Maximum number of results
});
console.log(laps);

Data Pack Operations

// Get data packs for a team
const dataPacks = await client.dataPacks.list('team-id');

// Get specific data pack
const dataPack = await client.dataPacks.get('team-id', 'datapack-id');

// Subscribe to a data pack
await client.dataPacks.subscribe('datapack-id');

Advanced Examples

The library includes detailed examples in the examples directory:

Lap Comparison Analysis

Located in examples/lap_comparison.js, this example demonstrates how to:

  • Download and compare telemetry data from two different laps
  • Analyze speed profiles
  • Compare throttle and brake usage
  • Examine gear usage patterns
  • Study acceleration patterns (G-forces)

To run the example:

  1. Install the required dependency:
npm install papaparse
  1. Update the configuration in examples/lap_comparison.js:
const YOUR_ACCESS_TOKEN = 'your-access-token'; // Get this from your Garage61 account
const LAP_ID_1 = 'first-lap-id';  // Get this from the Garage61 API/interface
const LAP_ID_2 = 'second-lap-id'; // Get this from the Garage61 API/interface
  1. Run the example:
node examples/lap_comparison.js

The script will output a comprehensive analysis comparing the two laps, including:

  • Basic lap information (times, track, car, driver)
  • Speed analysis (average and maximum speeds)
  • Throttle and brake usage patterns
  • Gear usage distribution
  • G-force analysis (lateral and longitudinal acceleration)

API Reference

User Methods

  • me.getInfo() - Get information about the authenticated user
  • me.getStatistics() - Get personal driving statistics
  • me.getLinkedAccounts() - Get linked platform accounts
  • me.subscribeToGroup(groupId) - Subscribe to a data pack group
  • me.unsubscribeFromGroup(groupId) - Unsubscribe from a data pack group

Team Methods

  • teams.list() - Get list of joined teams
  • teams.getInfo(teamId) - Get information about a specific team
  • teams.getStatistics(teamId) - Get team driving statistics
  • teams.createInvite(teamId, options) - Create a team invite
  • teams.removeMember(teamId, userId) - Remove a member from the team

Lap Methods

  • laps.find(options) - Find laps and lap records
  • laps.get(lapId) - Get information about a specific lap
  • laps.getTelemetry(lapId) - Export telemetry for a lap as CSV

Data Pack Methods

  • dataPacks.list(teamId) - Get data packs for a team
  • dataPacks.get(teamId, dataPackId) - Get a specific data pack
  • dataPacks.update(teamId, dataPackId, options) - Update a data pack
  • dataPacks.subscribe(dataPackId) - Subscribe to a data pack
  • dataPacks.unsubscribe(dataPackId) - Unsubscribe from a data pack
  • dataPacks.listGroups(teamId) - Get data pack groups for a team
  • dataPacks.getGroup(teamId, groupId) - Get a specific data pack group
  • dataPacks.addToGroup(teamId, groupId, dataPackId) - Add a data pack to a group
  • dataPacks.removeFromGroup(teamId, groupId, dataPackId) - Remove a data pack from a group

Content Download Methods

  • dataPacks.getGhostLap(teamId, dataPackId, itemId) - Download ghost lap file
  • dataPacks.getLapTelemetry(teamId, dataPackId, itemId) - Export lap telemetry
  • dataPacks.getReplay(teamId, dataPackId, itemId) - Download replay file
  • dataPacks.getSetup(teamId, dataPackId, itemId) - Download iRacing setup file

Platform Methods

  • platforms.list() - Get available platforms
  • cars.list() - Get available cars
  • tracks.list() - Get available tracks
  • carGroups.list() - Get available car groups

Error Handling

The client will throw errors for various failure cases:

try {
  const laps = await client.laps.find({ tracks: [123] });
} catch (error) {
  if (error.response) {
    // The request was made and the server responded with an error status
    console.error('API Error:', error.response.data);
  } else if (error.request) {
    // The request was made but no response was received
    console.error('Network Error:', error.request);
  } else {
    // Something else went wrong
    console.error('Error:', error.message);
  }
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.