View source: R/pxweb_test_api_endpoint.R
pxweb_test_api | R Documentation |
The function can be used to test a whole pxweb api by using the api base url. By using a branch in a tree the api is tested below this branch.
pxweb_test_api(
url,
test_type = "first",
n = 1,
verbose = TRUE,
time_limit = Inf
)
url |
The base url to the pxweb api (or a branch of the metadata tree) |
test_type |
What type of test should be done.
The |
n |
sample size if |
verbose |
The function will print information. |
time_limit |
Time limit in second the API is allowed to be tested. |
Function returns a data.frame with information on each node
Two variables are added:
checked
: The node has been checked
error
: Whether there were errors encountered with the call
download_error
: Whether there were errors encountered during download
## Not run:
url <- "https://bank.stat.gl/api/v1/en/Greenland/BE/BE01"
res <- pxweb_test_api(url)
res <- pxweb_test_api(url, test_type = "touch")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.