View source: R/RateLimitWrap_function.R
RateLimitWrap | R Documentation |
Takes any other function in the Companies House documentation and returns the same function with rate limiting.
Uses trace
to listen in on the headers of each HTTP request. As it's quite noisy, consider running with
suppressMessages()
.
RateLimitWrap(func, ..., buffer = 5, silent = FALSE)
func |
The function you want to add rate limiting to |
buffer |
Optional. The amount of requests left before the wrapper will pause. Default is 5 |
silent |
Optional. Suppresses printed messages |
A function with rate limiting added
PersonSearch.Rated <- RateLimitWrap(PersonSearch_limit_first)
PersonSearch.Rated(person, mkey)
PersonSearch.Rated(person, mkey, silent = TRUE)
suppressMessages(PersonSearch.Rated(person, mkey))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.