Description Usage Arguments Details Value
Manages list of all API calls made in the last 10 seconds. If no tracker is provided, a new one is returned. If an already existing tracker is passed as an argument to the function, the function will add a new call to it, then remove all items with a timestamp > 10 seconds from current system time.
1 | update_call_tracker(tracker = NULL)
|
tracker |
Currently tracked calls |
The SCB API limits calls to 10 per 10 seconds (rolling). If this number is
exceeded, GET
returns a 429 response. We could use
Sys.sleep
with time set to 10 seconds when this occurs,
to reset the counter, but this would be inefficient: since the limit is
rolling, we should only wait until the oldest call is > 10 seconds in the
past, and then attempt a new query. This is what this function facilitates.
data.frame containing currently tracked calls
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.