Optional
limitBehavior to apply when the rate limit is reached.
Optional
limitWhether to limit the number of requests to 1 per second.
According to the official documentation, the Donation Alerts API allows up to 60 requests per minute per application, which translates to 1 request per second.
By default, the library enforces this rate limit, ensuring that requests are executed sequentially at 1 request per second. For example, if you initiate 60 simultaneous requests, they will be queued and executed one by one.
If set to false
, you can exceed the limit in a short period (e.g., 10 seconds), but subsequent requests
will fail for the remaining duration of the 60-second window due to the API's rate limit.
Requests exceeding the limit are enqueued and executed later by default. You can customize this behavior using the RateLimiterOptions#limitReachedBehavior property.
Configuration options for the rate limiter.