ridewithgps-client
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

ridewithgps-client

Node client for the RideWithGPS API (https://ridewithgps.com/api)

Usage

const client = new RideWithGPSClient('api-key');

const user = await client.authenticateUser('email@example.com', 'myCoolPassword');
// Save user.auth_token and user.id to skip needing email/password later.

const rides = await client.getRides();

// Or provide a userId for a different user.
const otherUsersRides = await client.getRides({ userId: 123456 });

// Can also provide paging params.
const pageOfRides = await client.getRides({ offset: 20, limit: 10 });

// Can also refetch the user.
const refetchedUser = await client.getUser();

// Reuse auth token to skip authentication.
const newClient = new RideWithGPSClient('api-key', authToken, userId);

Package Sidebar

Install

npm i ridewithgps-client

Weekly Downloads

3

Version

1.0.4

License

MIT

Unpacked Size

23.3 kB

Total Files

19

Last publish

Collaborators

  • jmoseley