Skip to content

[Feature in SDK]: Request rate limiter #76

@shkarupa-alex

Description

@shkarupa-alex

Description

As mentioned here https://apidocs.bitrix24.com/limits.html Bitrix24 has rate limits for requests.
It would be great if SDK will support some kind of rate limiting.

Example

$api = ServiceBuilderFactory::createServiceBuilderFromWebhook('<hook>');

$limit = new RateLimiter(500); // time in miliseconds between requests
$api = $api->withLimit($limit); // should limit (sleep) `ApiClient::getResponse` calls

$res = $api->getCRMScope()->lead()->batch->list(['ID' => 'ASC'], [], ['ID', 'DATE_MODIFY'], 1000000);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions