Learn R Programming

redcapAPI (version 2.3)

genericApiCall: Generic Interface the REDCap API.

Description

Permits users to make generic calls to the REDCap API. This allows use of API methods that do not yet have dedicated support.

Usage

genericApiCall(
  rcon,
  content,
  make_data_frame = TRUE,
  colClasses = NA,
  returnFormat = "csv",
  ...
)

# S3 method for redcapDbConnection genericApiCall( rcon, content, make_data_frame = TRUE, colClasses = NA, returnFormat = "csv", ... )

# S3 method for redcapApiConnection genericApiCall( rcon, content, make_data_frame = TRUE, colClasses = NA, returnFormat = "csv", ..., error_handling = getOption("redcap_error_handling") )

Arguments

rcon

A REDCap connection object as generated by redcapConnection.

content

character(1) The content argument for the API call.

make_data_frame

logical(1). When TRUE, an attempt is made to coerce the output to a data frame with read.csv. Otherwise, it is returned as a character vector.

colClasses

A named list of column names and classes to apply via read.csv

returnFormat

character(1) The format for the return. Defaults to "csv".

...

Additional named arguments giving arguments to the API method.

error_handling

An option for how to handle errors returned by the API. see redcap_error