Call the TSC API serializer's list view with given GET
parameters, parse the response's features into a nested list.
This function requires the TSC API to return the results in a key
features
(if GeoJSON) or data
(if JSON).
tsc_GET(
serializer,
query = list(),
format = "json",
max_records = NULL,
chunk_size = 1000,
api_url = get_tsc_api_url(),
api_token = get_tsc_api_token(),
verbose = get_tsc_verbose()
)
(character) TSC API serializer name (required)
Possible values see https://tsc.dbca.wa.gov.au/api/1/
(list) A list of GET parameters, default: list().
The format
is specified in a separate top-level param.
(chr) The desired API output format, default: "json".
(int) The maximum number of records retrieved. If left at default (NULL), all records are returned. Default: NULL.
(int) The number of records to retrieve in each paginated
response. A specified but smaller limit
will override
chunk_size
.
Adjust chunk_size
down if getting timeouts from the API.
Default: 1000.
(character) The TSC API URL,
default get_tsc_api_url
, see tsc_setup
(character) The TSC API token,
default get_tsc_api_token
, see tsc_setup
Whether to show verbose messages.
Default: get_tsc_verbose
.
An S3 object of class 'tsc_api_response' containing: features: The sent GeoJSON features serializer: The called serializer, e.g. 'area' response: The API HTTP response with all metadata
Other api:
handle_http_status()
,
print.tsc_api_response()
,
tsc_POST()
,
tsc_chunk_post()
,
tsc_occ_obs_post()
,
tsc_parse()
if (FALSE) {
area_records <- tsc_GET("area")
}