motusQuery | R Documentation |
Send a query to the motus API
motusQuery(API, params = NULL, requestType = "post", show = FALSE,
json = FALSE, serno = NULL, masterKey = NULL)
API |
one of the MOTUS_API_... constants |
params |
named list of API-specific parameters |
requestType |
"post" or "get" |
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 |
serno |
serial number of receiver from which request is being sent; if NULL, the default, uses MOTUS_SECRETS$serno. |
masterKey |
if NULL (the default), use key from the
MOTUS_SECRETS object. Otherwise, |
the result of sending the request to the motus 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.
If the query returns with a status code of >= 400, this function calls stop(X) where
X is the (typically JSON-encoded) body of the reply.
all queries and return values are logged in the file "motus_query_log.txt" in the user's home directory.
John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.