Sports Db Config
Client settings. Build with SportsDbClient's DSL:
val client = SportsDbClient { apiKey = System.getenv("THESPORTSDB_API_KEY") }Properties
Optional response cache; null (the default) disables caching.
Time-to-live per kind of data, used when cache is set.
Share one HTTP request between identical calls made at the same time (same URL and key), so ten coroutines asking for the same table cause one request, not ten.
True when apiKey is one of the public free keys (FREE_API_KEYS). Any other key the API accepts is a paid key; see SportsDbClient.isPremiumKey to check one.
Retries for network errors and HTTP 5xx, with exponential backoff.
How long to wait after a 429 when the server does not say. The docs say one minute.
Called once per call, after it finishes: for logging and metrics. See RequestEvent.
Client-side limit, in requests per minute, shared by v1 and v2. null picks the documented limit for the key: 30 for the free key, 100 for a premium key. Set it to 120 on a business plan, or 0 to turn limiting off.
First backoff delay; doubles on every retry.
On HTTP 429, wait (the Retry-After time, or rateLimitWait) and try once more.
The HTTP stack. null (the default) uses OkHttp with timeout. Pass OkHttpTransport(yourClient) to share an OkHttp client (its own timeouts then apply).
Functions
Java: sets rateLimitWait.
Java: sets retryBackoff.
Java: sets timeout.