Constructs a tibble of individual API calls for an API request
Usage
ca_apicalls(
x,
slug_check = TRUE,
date_check = TRUE,
loc_check = TRUE,
units_check = TRUE,
spag_check = FALSE,
pf = FALSE,
check_for = c("getvals", "getrst"),
ignore_spag = deprecated(),
preflight = deprecated()
)
Arguments
- x
A Cal-Adapt API request
- slug_check
Cross check the slug against the raster series catalog
- date_check
Cross check the start and end date against the raster series catalog
- loc_check
Check locations for duplicate values and the Cal-Adapt coverage area
- units_check
Check for consistent units
- spag_check
Check spatial aggregation option
- pf
Run as a preflight check only, logical
- check_for
Which operations or context to use
- ignore_spag
Deprecated
- preflight
Deprecated
Value
If pf = TRUE
, a list of three types of errors / issues discovered: i) general errors, ii) problems
specific to querying values, and iii) problems specific to downloading rasters.
Details
This is an internal function which a) evaluates an API request and generates a tibble of individual API calls, and b) checks for errors. It is exported as it may have some use for trouble-shooting and developers, but is not something most users will need.
This function is called in two contexts:
a) by ca_preflight() which will report the errors to the user
b) by data fetching functions (ca_getvals_tbl, ca_getvals_db, and ca_getrst_stars), which loop through the tibble returned to fetch the data