@ipregistry/client
    Preparing search index...

    Class IpregistryConfigBuilder

    Provides a builder pattern for constructing IpregistryConfig instances. This class allows for setting the apiKey, baseUrl, and timeout before building the final IpregistryConfig object.

    Pass an IpregistryClientOptions object to the IpregistryClient constructor instead, e.g. new IpregistryClient({ apiKey: 'KEY', timeout: 10000 }).

    Index

    Constructors

    Methods

    • Sets how many batch sub-requests are dispatched concurrently when a batch is large enough to be split into chunks. A value <= 0 is ignored. Set it to 1 for strictly sequential dispatch, which is gentler on a rate-limited API key.

      Parameters

      • batchConcurrency: number

        How many batch sub-requests run concurrently.

      Returns IpregistryConfigBuilder

      The IpregistryConfigBuilder instance for chaining.

    • Sets the maximum number of values sent in a single batch request. Batch lookups split larger inputs into this many values per request. Values are capped at DEFAULT_MAX_BATCH_SIZE (the API limit); a value <= 0 is ignored.

      Parameters

      • maxBatchSize: number

        The maximum number of values per batch request.

      Returns IpregistryConfigBuilder

      The IpregistryConfigBuilder instance for chaining.

    • Sets the maximum number of automatic retries performed in addition to the initial attempt. Use 0 to disable retries.

      Parameters

      • maxRetries: number

        The maximum number of retries.

      Returns IpregistryConfigBuilder

      The IpregistryConfigBuilder instance for chaining.

    • Sets the base backoff between retries. Successive retries use an exponentially increasing delay (retryInterval * 2^attempt). When a response carries a Retry-After header, that value takes precedence.

      Parameters

      • retryInterval: number

        The base backoff in milliseconds.

      Returns IpregistryConfigBuilder

      The IpregistryConfigBuilder instance for chaining.

    • Controls whether 5xx responses (and transient network errors) are retried. Defaults to true.

      Parameters

      • retryOnServerError: boolean

        Whether 5xx responses are retried.

      Returns IpregistryConfigBuilder

      The IpregistryConfigBuilder instance for chaining.

    • Controls whether 429 Too Many Requests responses are retried, honoring the Retry-After header when present. Ipregistry does not rate limit by default (it is opt-in per API key), so this defaults to false.

      Parameters

      • retryOnTooManyRequests: boolean

        Whether 429 responses are retried.

      Returns IpregistryConfigBuilder

      The IpregistryConfigBuilder instance for chaining.