upload_surveys: Upload a tibble of Surveys to WAStD

View source: R/upload_surveys.R

upload_surveysR Documentation

Upload a tibble of Surveys to WAStD

Description

Upload a tibble of Surveys to WAStD

Usage

upload_surveys(
  x,
  api_url = wastdr::get_wastdr_api_url(),
  api_token = wastdr::get_wastdr_api_token(),
  verbose = wastdr::get_wastdr_verbose()
)

Arguments

x

A tibble of Surveys, e.g. the output of odkc_svs_sve_as_wastd_surveys(). Note that attachments should be relative or absolute file paths, not httr::upload_file() objects.

api_url

(character) The WAStD API URL, default get_wastdr_api_url, see wastdr_setup

api_token

(character) The WAStD API token, default get_wastdr_api_token, see wastdr_setup

verbose

Whether to show debug messages. Default: wastdr::get_wastdr_verbose()

api_un

(character) A WAStD API username, default get_wastdr_api_un, see wastdr_setup

api_pw

(character) A WAStD API password, default get_wastdr_api_pw, see wastdr_setup

Details

WAStD's MediaAttachment endpoint uses a plain ModelViewSet and cannot handle multiple uploads. This function therefore uploads records individually. If a file does not exist locally, the record is skipped and a warning is emitted.


dbca-wa/etlTurtleNesting documentation built on Nov. 18, 2022, 8:03 a.m.