@ipregistry/client
    Preparing search index...

    Class IpregistryConfig

    Represents the configuration for the Ipregistry API client. This class holds the API key, base URL, and timeout setting used for API requests.

    Index

    Constructors

    • Constructs a new IpregistryConfig instance.

      Parameters

      • apiKey: string

        The API key for authenticating requests.

      • baseUrl: string

        Optional. The base URL of the Ipregistry API.

      • timeout: number

        Optional. The timeout for API requests in milliseconds.

      • OptionalmaxRetries: number

        Optional. The maximum number of automatic retries.

      • OptionalretryInterval: number

        Optional. The base backoff between retries in milliseconds.

      • OptionalretryOnServerError: boolean

        Optional. Whether 5xx responses are retried.

      • OptionalretryOnTooManyRequests: boolean

        Optional. Whether 429 responses are retried.

      • OptionalmaxBatchSize: number

        Optional. The maximum number of values per batch request.

      • OptionalbatchConcurrency: number

        Optional. How many batch sub-requests run concurrently.

      Returns IpregistryConfig

    Properties

    apiKey: string

    The API key used for authenticating requests to Ipregistry.

    baseUrl: string = 'https://api.ipregistry.co'

    The base URL of the Ipregistry API. Defaults to 'https://api.ipregistry.co'.

    batchConcurrency: number = 4

    How many batch sub-requests are dispatched concurrently when a batch is large enough to be split into chunks. Defaults to 4.

    maxBatchSize: number = DEFAULT_MAX_BATCH_SIZE

    The maximum number of values sent in a single batch request. Larger batches are split into this many values per request. Capped at DEFAULT_MAX_BATCH_SIZE (the API limit).

    maxRetries: number = 3

    The maximum number of automatic retries performed in addition to the initial attempt. Applies to transport errors (timeouts, network failures) and to the response statuses enabled by retryOnServerError and retryOnTooManyRequests. Defaults to 3. Use 0 to disable retries.

    retryInterval: number = 1000

    The base backoff (in milliseconds) between retries. Successive retries use an exponentially increasing delay (retryInterval * 2^attempt). When a response carries a Retry-After header, that value takes precedence. Defaults to 1000.

    retryOnServerError: boolean = true

    Whether 5xx responses (and transient network errors) are retried. Defaults to true.

    retryOnTooManyRequests: boolean = false

    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.

    timeout: number = 5000

    The timeout (in milliseconds) for API requests. Defaults to 5000.