Skip to content

v1.3.0 - Rate-Limit Awareness

Latest

Choose a tag to compare

@makowskid makowskid released this 06 Feb 07:41
· 4 commits to master since this release

What's New

Rate-Limit Awareness

The SDK now automatically handles API rate limits:

  • Automatic 429 retry - when the API returns HTTP 429 (Too Many Requests), the client reads the Retry-After header, sleeps, and retries (up to 3 times by default)
  • In-memory rate-limit tracking - X-RateLimit-Limit and X-RateLimit-Remaining headers are extracted from every API response
  • Adaptive polling - during fetchResults(), polling intervals are automatically increased when remaining requests drop below a configurable threshold
  • Public getters - getRateLimitLimit() and getRateLimitRemaining() let you inspect rate-limit state after any API call
  • Configurable - setMaxRetryOnRateLimit() and setRateLimitLowThreshold() to tune behavior

Other Changes

  • User-Agent bumped to SharpAPIPHPAgent/1.3.0
  • Branch alias updated to 1.3.x-dev

Backward Compatibility

Fully backward compatible - no constructor changes, no signature changes to existing public/protected methods. All 25 child packages inherit the new behavior automatically.