python-intercom icon indicating copy to clipboard operation
python-intercom copied to clipboard

throttle api requests by default

Open arjunbanker opened this issue 9 years ago • 2 comments
trafficstars

it would be helpful if all intercom api requests were throttled automatically to avoid exceeding limits

arjunbanker avatar Mar 11 '16 22:03 arjunbanker

No immediate plans on adding this Arjun. The current rate limit details are stored in the version-3 client (see rate_limit_details).

jkeyes avatar Mar 19 '16 22:03 jkeyes

@arjunbanker Have a look in the auto-throttle branch. It's a simple solution that sleeps until the rate limit is reset. To enable the throttling a client has to be created with a parameter: Client(personal_access_token="xxx", throttle=True).

jkeyes avatar Feb 16 '17 13:02 jkeyes