genericApiCall: Generic Interface the REDCap API.

Description Usage Arguments

View source: R/genericApiCall.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
genericApiCall(
  rcon,
  content,
  make_data_frame = TRUE,
  colClasses = NA,
  returnFormat = "csv",
  ...
)

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

## S3 method for class '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


redcapAPI documentation built on Feb. 18, 2020, 1:09 a.m.