build_call: Build an API call (uses the appropriate function based on the...

Description Usage Arguments Value See Also Examples

View source: R/build.R

Description

Build an API call (uses the appropriate function based on the data item)

Usage

1
2
3
4
5
6
7
8
build_call(
  data_item,
  api_key,
  service_type = c("csv", "xml"),
  api_version = "v1",
  warn = TRUE,
  ...
)

Arguments

data_item

character string; data item to be retrieved

api_key

character string; user's API key

service_type

character string; one of "csv" or "xml" to define return format

api_version

character string; API version to use - currently only on version 1

warn

logical; should you be warned if any of the parameters you've supplied may not be appropriate for that data item? Default is TRUE.

...

values to be passed to appropriate build_x_call function

Value

list; list with entries url for the call, service_type and data_item

See Also

build_b_call()

build_remit_call()

build_legacy_call()

Other call-building functions: build_b_call(), build_legacy_call(), build_remit_call()

Examples

1
2
3
4
build_call(data_item = "TEMP", api_key = "12345", from_date = "12 Jun 2018",
to_date = "13 Jun 2018", service_type = "csv")
build_call(data_item = "QAS", api_key = "12345",
settlement_date = "01 Jun 2019", service_type = "xml")

BMRSr documentation built on June 14, 2021, 5:09 p.m.