Downloads the data for a specific user, species, and region into a temporarly (or not) SQLite3 database. The data can be extracted from this database via the extract_data() function.

download_data(
  session,
  region,
  speciesID,
  token = session$unToken,
  curl_handle = session$curl,
  api_baseurl = session$base_url,
  db_file = tempfile(),
  end_point = "/api/data/download",
  api_url = paste0(api_baseurl, end_point),
  ...
)

Arguments

session

list, an object created by start_session()

region

integer, optional??

speciesID

integer, optional??

token

character, the token for the established session

curl_handle

a curl handle for the established session

api_baseurl

character, the base URL for the database API

db_file

character, the file to store the downloaded data in. Defaults to a temporary file.

end_point

character, the suffix for the download end point

api_url

character, the full url for the API end point for downloading data

...

additional arguments passed to getBinaryURL()

Value

character

Author

Matt Espe

Examples