POST data to a TSC API serializer in chunks

tsc_chunk_post(
  data,
  serializer,
  query = list(),
  chunksize = 1000,
  encode = "json",
  api_url = get_tsc_api_url(),
  api_token = get_tsc_api_token(),
  verbose = get_tsc_verbose()
)

Arguments

data

Data to post to the serializer

serializer

A TSC API serializer, e.g. "occ-taxon-point"

query

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

chunksize

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

encode

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

api_url

(character) The TSC API URL, default get_tsc_api_url, see tsc_setup

api_token

(character) The TSC API token, default get_tsc_api_token, see tsc_setup

verbose

Whether to show verbose messages. Default: get_tsc_verbose.

Value

The tsc_api_response of the last batch of data.

Examples

if (FALSE) {
# chunk_post examples from ETL scripts
}