This is the workhorse function that makes authenticated HTTP requests to the MTurk API. It is not exported as of v0.5.
request(operation, GETparameters = NULL,
keypair = getOption('MTurkR.keypair'),
browser = getOption('MTurkR.browser'),
log.requests = getOption('MTurkR.log'),
sandbox = getOption('MTurkR.sandbox'),
verbose = getOption('MTurkR.verbose'),
validation.test = getOption('MTurkR.test'),
service = "AWSMechanicalTurkRequester",
version = "2012-03-25")
The MTurk API operation to be performed.
An optional character string containing URL query parameters that specify options for the request.
A two-element character vector containing an AWS Access Key ID and an AWS Secret Access Key. Default is from options('MTurkR.keypair')
.
Optionally open the request in the default web browser, rather than opening in R. Default is FALSE
.
A logical specifying whether API requests should be logged. Default is TRUE
. See readlogfile
for details.
Optionally execute the request in the MTurk sandbox rather than the live server. Default is FALSE
.
Whether errors produced by the MTurk API request should be printed.
Currently a logical that causes request
to return the URL of the specified REST request. Default is FALSE
. May additionally validate the request (and supply information about that validation) in the future.
The MTurk service to which the authenticated request will be sent. Supplied only for advanced users.
The version of the MTurk API to use. Default is “2012-03-25”, under which the MTurkR package was built.
A list of class “MTurkResponse” containing:
A character string identifying the MTurk API operation performed.
The Request ID created by the API request.
The URL of the MTurk API REST request.
A logical indicating whether or not the request was valid and thus executed as intended.
A character string containing the XML API response.
This is an internal function that executes MTurk API requests. It is made available for use by advanced users to execute custom API requests.