collapse_galah: Generate a query

collapse_galahR Documentation

Generate a query

Description

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 class 'data_request'
collapse(x, ..., mint_doi)

## S3 method for class 'metadata_request'
collapse(x, ...)

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

Arguments

x

An object of class data_request, metadata_request or files_request

...

Arguments passed on to methods

mint_doi

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

thumbnail

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

Value

An object of class query_set, which is a list containing one or more objects of class query. This is valuable because it shows the set of queries required to correctly retrieve the requested data. Objects within a query_set are listed in the sequence in which they will be enacted.


galah documentation built on Nov. 20, 2023, 9:07 a.m.