@0x3639/intervals-icu
    Preparing search index...

    Class IntervalsClient

    Intervals.icu API Client (v2)

    Comprehensive TypeScript client for the Intervals.icu API. Supports 149 endpoints across 16 resource groups.

    // API key auth (personal use)
    const client = new IntervalsClient({ apiKey: 'your-api-key', athleteId: 'i12345' });

    // OAuth bearer token auth (apps)
    const client = new IntervalsClient({ accessToken: 'oauth-token' });

    // Use service accessors
    const streams = await client.activities.getStreams('i55610271');
    const settings = await client.sportSettings.list();
    await client.chats.sendMessage({ to_athlete_id: '123', content: 'Hello!' });
    Index
    activities: ActivityService

    Activities (completed or uploaded) — streams, intervals, files, curves

    analytics: AnalyticsService

    Histograms, time-at-HR, interval stats, power models, multi-activity curves

    athletes: AthleteService

    Athlete profile, training plans

    Chats and messages

    customItems: CustomItemService

    Custom items (charts, fields, etc.)

    events: EventService

    Calendar events (workouts, notes, races)

    folders: FolderService

    Workout folders and training plans

    Gear and equipment management

    performance: PerformanceService

    Athlete-level performance curves (power, pace, HR)

    routes: RouteService

    Activity routes

    Search activities and athletes

    sharedEvents: SharedEventService

    Shared events (races, group events)

    sportSettings: SportSettingsService

    Sport settings (thresholds, zones, load settings)

    Weather forecasts and config

    wellness: WellnessService

    Wellness data (weight, HRV, sleep, etc.)

    workouts: WorkoutService

    Library workouts (templates in folders/plans)

    • Get remaining API calls before rate limit

      Returns number | undefined

    • Get time when rate limit resets

      Returns Date | undefined