Whisper

Introduction

Whisper - A typed, zero-dependency TypeScript wrapper for every Riot Games API endpoint

Whisper is a TypeScript library that wraps every Riot Games API endpoint with full type safety, proactive rate limiting, and tree-shakeable per-game imports. Zero runtime dependencies -- just native fetch.

Features

  • Zero runtime dependencies -- uses native fetch only. Works in Node, Deno, Bun, and edge runtimes.
  • Proactive rate limiting -- parses Riot's rate limit headers and queues requests before hitting limits. No more 429s.
  • Tree-shakeable -- import only the game you need: @wardbox/whisper/lol, @wardbox/whisper/tft, etc.
  • Type-safe routing -- platform vs regional vs Valorant routing enforced at compile time. Wrong route type = type error.
  • Configurable caching -- per-method TTL with pluggable adapters (in-memory default, Redis, custom).
  • Middleware pipeline -- intercept requests and responses for logging, metrics, and custom behavior.

Getting Started

New to Whisper? Start here:

  • Quickstart -- Install the package and make your first API call in under 5 minutes

Guides

Deep dives into core concepts:

  • Routing -- Understand platform, regional, and Valorant routing types
  • Rate Limiting -- How the proactive rate limiter works and how to configure it
  • Caching -- TTL configuration, custom adapters, and cache behavior
  • Middleware -- Build logging, metrics, and custom interceptors

API Reference

Type tables and method signatures for every game:

On this page