Submits multiple get requests to the Harvest API v2. Supports parallel execution through furrr & the future package.

get_requests(urls, table, user, key, ...)

Arguments

urls

Named list of character vectors of urls in groups from build_url_groups function.

table

Character table name to be submitted to the Harvest API v2. Refer to Harvest API v2.

user

Character account number (e.g. user = '12345') for authentication. Register at Harvest Developers.

key

Character key (e.g. key = 'Bearer <secret key>') for API authentication. Register at Harvest Developers.

...

Additional arguments, potentially passed to other functions - see details in get_table

Value

named list of contents of API responses for specified group of URLs

References

https://github.com/HenrikBengtsson/future
https://davisvaughan.github.io/furrr
https://rstudio.com/resources/rstudioconf-2020/parallel-computing-with-r-using-foreach-future-and-other-packages
https://help.getharvest.com/api-v2/introduction/overview/general

See also

[future::plan()] for details regarding how to implement parallel api calls