Skip to contents

collapse() constructs a valid query so it can be inspected before being sent. It typically occurs at the end of a pipe, traditionally begun with galah_call(), that is used to define a query. As of version 2.0, objects of class data_request (created using request_data()), metadata_request (from request_metadata()) or files_request (from request_files()) are all supported by collapse(). Any of these objects can be created using galah_call() via the method argument.

Usage

# S3 method for data_request
collapse(x, ..., mint_doi, .expand = FALSE)

# S3 method for metadata_request
collapse(x, .expand = FALSE, ...)

# S3 method for files_request
collapse(x, thumbnail = FALSE, ...)

Arguments

x

An object of class data_request, metadata_request or files_request

...

Arguments passed on to other methods

mint_doi

Logical: should a DOI be minted for this download? Only applies to type = "occurrences" when atlas chosen is "ALA".

.expand

Logical: should the query_set be returned? This object shows all the requisite data needed to process the supplied query. Defaults to FALSE; if TRUE will append the query_set to an extra slot in the query object.

thumbnail

Logical: should thumbnail-size images be returned? Defaults to FALSE, indicating full-size images are required.

Value

An object of class query, which is a list-like object containing at least the slots type and url.