request
request copied to clipboard
Rate limiting
Creating a general purpose rate limiting helper would be useful i think. Aspects:
- Arguments:
-
value- Limit value (e.g.,100) -
period- Per time frame (e.g.sec,min,hr,day) -
on_limit- what to do when limit reached? (see below) - May need extra arguments depending on API
-
-
on_limit--
stop- and give error message to use -
warn- and give error message to use -
queue- and give max time to wait in queue (if R session quits this queue gone)
-
There is server side rate limiting, which is intertwined with this
use cases
- user say what rate limits are, and thats it - then we check rate limit info if given for them, if not sadface
- user say what rate limits are, and user set some limit < than max limit
- user specify do something specific on hitting rate limit e.g, give warning or wait a certain amount of time before proceeding
moving to next milestone, trying to get MVP out #10