arg.spec: Function to define arguments for a web API call.

Description Usage Arguments Details Value

Description

Allows to define each component of a web API call and to map it to an argument of an R call

Usage

1
2
3
4
5
6
7
arg.spec(default = NULL, type = class(default),
  mandatory = is.null(default), validate = function(x) is.null(type) ||
  class(x) %in% type, conversion = as.character, export = identity)

a(default = NULL, type = class(default), mandatory = is.null(default),
  validate = function(x) is.null(type) || class(x) %in% type,
  conversion = as.character, export = identity)

Arguments

default

The default value for this argument

type

The desired type (currently unenforced)

mandatory

Whether this argument is mandatory.

validate

Validation function for the value of an argument (currently unused)

conversion

The conversion function to be applied to an R value to obtain and appropriate encoding for the web call.

export

Whether this argument should aslo be an argument to the corresponding R call (some web API call take a conventional value, in other cases it can be computed from the other arguments, or it is a random id)

Details

Used exclusively to define arguments to the function make.web.call

Value

A list containing the information needed by make.web.call


RevolutionAnalytics/webapi documentation built on May 9, 2019, 9:59 a.m.