AniLink - v3.1.0
    Preparing search index...

    Function buildAniListWiring

    • Builds the AniList facade from the operation classes.

      Operations are constructed lazily on first property access (see buildLazyGroup); only the registry is validated eagerly. The A custom request is also constructed on first access. Every operation, including custom, is constructed with one shared per-client stateOwner, so circuit-breaker streaks, retry budgets, and rate-limit pacing deadlines span every operation of the returned client (still keyed per upstream host inside the state maps). When the caller supplies a stateOwner (the composition seam does, so AniLink#getTransportState can snapshot the client's resilience state), that object is used; a direct buildAniListApi call without one allocates a fresh owner exactly as before.

      When the credential slot carries refresh fields, every facade method is wrapped with the automatic token-refresh lifecycle (see automatic refresh lifecycle); without them the facade keeps the direct bound methods, with zero wrapper overhead and zero behavior change.

      Parameters

      • OptionalauthToken: RequestAuthInput

        The authentication material shared by every operation instance. A plain string is treated as a bearer token; a structured RequestAuthInput carries explicit headers for schemes such as Basic auth or a provider API key.

      • Optionaloptions: RequestOptions

        Timeout, cancellation, and debugging settings for API requests.

      • OptionalstateOwner: object

        Stable per-client object keying the shared transport state (breaker, budget, pacing); when omitted, a fresh one is allocated for this client.

      • Optionalcredentials: AniListCredentials

        The raw AniList credential slot, read for the optional automatic token-refresh lifecycle fields; transport settings on the slot are ignored here because they already flow through options.

      Returns AniListApi

      The composed AniList API.