File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ they will be removed in a future major version.
3131// Before (6.x) // After (7.x)
3232new IpregistryClient ( new IpregistryClient ({
3333 new IpregistryConfigBuilder(' KEY' ) apiKey: 'KEY',
34- .withTimeout(10000 ) timeout: 10000 ,
3534 .withEuBaseUrl() baseUrl: ' eu' ,
36- .build(), cache: new InMemoryCache (),
35+ .withTimeout(10000 ) cache: new InMemoryCache (),
36+ .build(), timeout: 10000 ,
3737 new InMemoryCache()) })
3838
3939client .lookupIp (ip , client .lookupIp (ip , {
Original file line number Diff line number Diff line change @@ -182,11 +182,11 @@ precedence over the computed backoff. All of it is configurable:
182182``` typescript
183183const client = new IpregistryClient ({
184184 apiKey: ' YOUR_API_KEY' ,
185- timeout: 10000 , // per-attempt timeout, in milliseconds
186185 maxRetries: 2 , // 0 disables retries
187186 retryInterval: 500 , // backoff base, in milliseconds
188187 retryOnServerError: true , // retry 5xx responses (default: true)
189188 retryOnTooManyRequests: true , // retry 429 responses (default: false)
189+ timeout: 10000 , // per-attempt timeout, in milliseconds
190190});
191191```
192192
@@ -225,8 +225,8 @@ are configurable:
225225``` typescript
226226const client = new IpregistryClient ({
227227 apiKey: ' YOUR_API_KEY' ,
228- maxBatchSize: 256 , // values per request, capped at 1024
229228 batchConcurrency: 1 , // sequential dispatch, gentler on rate-limited keys
229+ maxBatchSize: 256 , // values per request, capped at 1024
230230});
231231```
232232
You can’t perform that action at this time.
0 commit comments