Skip to content

Releases: tomkp/strava

v1.0.0 - Initial Release

Choose a tag to compare

@tomkp tomkp released this 26 Dec 16:21
7623ca2

@tomkp/strava v1.0.0

A complete, type-safe TypeScript client for the Strava API v3.

Installation

npm install @tomkp/strava

Features

  • Full TypeScript support with comprehensive type definitions
  • Automatic token refresh when tokens expire
  • Rate limit tracking with easy access to usage info
  • Specific error types for different failure scenarios
  • Zero runtime dependencies - uses native fetch (Node.js 18+)
  • Database agnostic - works with any storage solution
  • Framework agnostic - use with Express, Fastify, Next.js, or any Node.js app
  • AbortController support for request cancellation
  • Webhook support - subscription management and event parsing
  • Pure validation functions - can be used standalone without client instance
  • Async iterators for memory-efficient pagination

Quick Start

import { StravaClient } from '@tomkp/strava';

const client = new StravaClient({
  clientId: process.env.STRAVA_CLIENT_ID!,
  clientSecret: process.env.STRAVA_CLIENT_SECRET!,
});

// After OAuth flow...
const athlete = await client.getAthlete();
const activities = await client.getActivities({ per_page: 50 });

Documentation