Call the WAStD API serializer's list view with given GET
parameters, parse the response's features into a nested list.
This function requires the WAStD API to return the results in a key
features
(if GeoJSON) or data
(if JSON).
wastd_GET(
serializer,
query = list(),
format = "json",
max_records = NULL,
chunk_size = 1000,
parse = FALSE,
api_url = get_wastdr_api_url(),
api_token = get_wastdr_api_token(),
api_un = get_wastdr_api_un(),
api_pw = get_wastdr_api_pw(),
verbose = wastdr::get_wastdr_verbose()
)
(character) WAStD API serializer name (required)
Possible values see https://tsc.dbca.wa.gov.au/api/1/
A list of GET parameters, default: list().
The format
is specified in a separate top-level param.
The desired API output format, default: "json".
The maximum number of records retrieved. If left at default (NULL), all records are returned. Default: NULL.
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.
Whether to parse data (TRUE) or not (FALSE, default).
(character) The WAStD API URL,
default get_wastdr_api_url
, see wastdr_setup
(character) The WAStD API token,
default get_wastdr_api_token
, see wastdr_setup
(character) A WAStD API username,
default get_wastdr_api_un
, see wastdr_setup
(character) A WAStD API password,
default get_wastdr_api_pw
, see wastdr_setup
Whether to show debug messages. Default: wastdr::get_wastdr_verbose()
An S3 object of class 'wastd_api_response' containing:
data: The parsed response content
serializer: The called serializer, e.g. 'supra'
url: The called URL
date: The timestamp of the request
status_code: The HTTP status code of the request
Other api:
build_auth()
,
download_minimal_wastd_turtledata()
,
download_wastd_sites()
,
download_wastd_turtledata()
,
download_wastd_users()
,
export_wastd_turtledata()
,
filter_wastd_turtledata_area()
,
filter_wastd_turtledata_seasons()
,
filter_wastd_turtledata()
,
handle_http_status()
,
wastd_POST()
,
wastd_bulk_post()
,
wastd_chunk_post()
,
wastd_create_update_skip()
,
wastd_parse()
,
wastd_post_one()
if (FALSE) {
track_records <- wastd_GET("turtle-nest-encounters")
tag_records <- wastd_GET("animal-encounters")
hatched_nest_records <- wastd_GET("turtle-nest-encounters",
query = list(nest_type = "hatched-nest")
)
}