Description Usage Arguments Value Author(s) Examples
Get data from given API URL(s)
1 2 3 4 |
api_urls |
character list comprising of API URL lists that are of 'url' class. If a vector is given, the function will wrap it into a list. |
use_curl |
logical, whether use |
parse_json |
logical, whether parse the output JSON character to R data.
If TRUE, |
time |
numeric, the time interval to access the api_urls, in seconds. It is used to avoid overuse of the APIs. Default 0. |
encoding |
character, the encoding of the API. Default NULL, indicating
that the function will automatically select an encoding for specific APIs.
The accepted 'encoding' is consistent with that in |
messaging |
logical, whether print messages when processing. Default FALSE. |
name_out |
character vector, the names of the output list. Default is set to
|
drop |
logical, whether unlist the result when there is only one list returned.
Default FALSE, which indicates that you will need to extract the result first.
Note that if you set |
... |
other arguments to pass to the function. |
a list comprising of 'api_data' objects. The 'api_data' class includes several useful subclasses, e.g. 'google_geocode', 'google_revgeocode', 'baidu_geocode', 'baidu_revgeocode', 'gaode_geocode', 'gaode_revgeocode', and 'ipify_geohost', 'ipinfo_geohost', 'ipstack_geohost', ... in asesgeo.
parse_json == FALSE: a list containing JSON strings
parse_json == TRUE: a list containing parsed data
Yiying Wang, wangy@aetna.com
1 2 3 4 5 | ## Not run:
api_urls <- c('<API 1>', '<API 2>', ...)
get_api_data(api_urls)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.