POST data to a WAStD API serializer in chunks

wastd_chunk_post(
  data,
  serializer,
  query = list(),
  chunksize = 1000,
  encode = "json",
  api_url = wastdr::get_wastdr_api_url(),
  api_token = wastdr::get_wastdr_api_token(),
  verbose = wastdr::get_wastdr_verbose()
)

Arguments

data

Data to post to the serializer

serializer

A WAStD API serializer, e.g. "encounters"

query

An optional query for wastd_POST, default: list().

chunksize

The number of records to post at a time, default: 1000.

encode

The parameter encode for link{httr::POST}, default: "json". Other options: c("multipart", "form", "json", "raw").

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()

Value

The wastd_api_response of the last batch of data.

Examples

if (FALSE) {
# ODKC data as WAStD data, chunk_post
}