Torn API Client
    Preparing search index...

    Interface TornAPIOptions

    Configuration options for the TornAPI client

    interface TornAPIOptions {
        apiKeyBalancing?: ApiKeyBalancing;
        apiKeys: string[];
        apiUrl?: string;
        comment?: string;
        headers?: Record<string, string>;
        rateLimitMode?: RateLimitMode;
        verbose?: boolean;
    }

    Hierarchy

    • Omit<RequestHandlerOptions, "apiKeys">
      • TornAPIOptions
    Index

    Properties

    apiKeyBalancing?: ApiKeyBalancing

    The strategy for balancing requests across multiple API keys. Defaults to 'roundRobin'

    apiKeys: string[]

    An array of your Torn API keys. At least one key is required

    apiUrl?: string

    The base URL for the Torn API. Defaults to the official v2 URL

    comment?: string

    A comment to include with every API request

    headers?: Record<string, string>

    Custom headers to send with every request

    rateLimitMode?: RateLimitMode

    Strategy for handling the 100 requests/minute rate limit. Defaults to 'autoDelay'

    verbose?: boolean

    If true, logs detailed information about requests, responses, and rate limiting to the console