AniLink - v3.1.0
    Preparing search index...

    Function buildProviderClients

    • buildProviderClients builds every public provider client from isolated credential slots.

      It invokes each factory with its matching AniLinkCredentials slot and returns one client and state owner per registry key. The optional legacyOptions argument exists only for the positional new AniLink(token, options) constructor form; the AniList factory consumes it, while provider-scoped credentials take precedence and other factories do not receive it.

      Parameters

      Returns ProviderClients

      Typed clients for every registered provider, a ProviderClients object.

      const clients = buildProviderClients({
      anilist: { authToken: "anilist-token" },
      mal: { accessToken: "mal-token" },
      });
      const anime = await clients.mal.anime.get({ id: 21 });