thesportsdb-client
    Preparing search index...

    Class SportsDb

    The TheSportsDB client.

    const db = new SportsDb();                                     // free key 123: v1 only
    const arsenal = await db.v1.lookup.team(133604);
    const premium = new SportsDb({ apiKey: process.env.THESPORTSDB_API_KEY, cache: new InMemoryResponseCache() });
    const tv = await premium.v2.tv.country("Canada");

    Reuse one client per key: its rate limiter, cache and de-duplication cover every call made through it.

    Index
    helpers: Helpers

    Common tasks in one call, using v2 or v1 depending on the key.

    v1: V1Api

    The v1 API (free and premium keys).

    v2: V2Api

    The v2 API (premium keys only).

    • Whether v2 accepts the key. One call (v2 lookup/league/4328) unless it's a free key.

      Returns Promise<boolean>