srvQuery: Send a query to the data server API

Description Usage Arguments Value Note Author(s)

Description

Send a query to the data server API

Usage

1
2
srvQuery(API, params = NULL, requestType = "post", show = FALSE,
  JSON = FALSE, auth = TRUE)

Arguments

API

one of the Motus$API_DATA_... constants

params

named list of API-specific parameters

requestType

"post" or "get"; default: "post".

show

if TRUE, print the request to the console before submitting to motus

JSON

if TRUE, return results as JSON-format string; otherwise, as R list

auth

if TRUE, the default, the API requires an authentication token, which will be included automatically from Motus$authToken Otherwise, an authentication token will be requested using the credentials in Motus[c("userLogin", "userPassword")]

Value

the result of sending the request to the data server API. The result is a JSON-format character scalar if json is TRUE; otherwise it is an R list with named components, extracted from the JSON return value.

Note

If you have not already entered your motus login credentials in this R session, you will be prompted for them.

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm


jbrzusto/motusClient documentation built on May 30, 2019, 4:33 p.m.