exportVersion: Export the REDCap Version Number

View source: R/exportVersion.R

exportVersionR Documentation

Export the REDCap Version Number

Description

These methods enable the user to export the REDCap instance version number.

Usage

exportVersion(rcon, ...)

## S3 method for class 'redcapApiConnection'
exportVersion(
  rcon,
  ...,
  error_handling = getOption("redcap_error_handling"),
  config = list(),
  api_param = list()
)

Arguments

rcon

A redcapConnection object.

...

Arguments to pass to other methods

error_handling

character(1). One of c("error", "null"). An option for how to handle errors returned by the API. see redcapError().

config

A named list. Additional configuration parameters to pass to httr::POST(). These are appended to any parameters in rcon$config.

api_param

A named list. Additional API parameters to pass into the body of the API call. This provides users to execute calls with options that may not otherwise be supported by redcapAPI.

Value

Returns a character value giving the version number.

IF this function is used in a version of REDCap that does not support the method (prior to version 6.0.0), the value "5.12.2" will be returned. This is done solely for the convenience of always returning a value that can be compared against other versions.

Examples

## Not run: 
unlockREDCap(connections = c(rcon = "project_alias"), 
             url = "your_redcap_url", 
             keyring = "API_KEYs", 
             envir = globalenv())
             
# Export the version number
exportVersion(rcon)

## End(Not run)


nutterb/redcapAPI documentation built on Feb. 11, 2024, 11:20 p.m.