rudimk / PyPplAPI

A Python wrapper around pplapi | http://pplapi.com
MIT License
1 stars 1 forks source link

need to handle rate limit HTTP error #1

Open iandennismiller opened 7 years ago

iandennismiller commented 7 years ago

FYI: If you hit the API too hard, it will throttle you and provide an HTTP error. I think it is HTTP error 421, specifically. Unless you catch the error, it will crash your init procedure, as you have currently written it.

To get around throttling, there is also a batch API endpoint that will give you access to something like 1500 agents before throttling. Here is the API reference documentation:

http://pplapi.com/docs/api/index.html

Thanks for your interest!

rudimk commented 7 years ago

Wow, how on earth did you find this?!

Yes, rate-limiting was the next item on my checklist. I was thinking of using the batch API endpoint in conjunction with sleep() to stay within the API limits.

Thanks for building this! I can't begin to tell you how epic pplapi is - but I'm sure you know already! :)

rudimk commented 7 years ago

Need to think about how this factors in with #4.