Learn R Programming

MTurkR (version 0.2)

ExtendHIT: Extend HIT

Description

Extend the time remaining on a HIT or the number of assignments available for the HIT.

Usage

ExtendHIT(hit = NULL, hit.type = NULL, add.assignments = NULL, add.seconds = NULL, 
		unique.request.token = NULL, keypair = credentials(), print = TRUE, 
		browser = FALSE, log.requests = TRUE, sandbox = FALSE)

Arguments

hit
An optional character string containing a HITId or a vector of character strings containing multiple HITIds.
hit.type
An optional character string containing a HITTypeId.
add.assignments
An optional character string containing the number of assignmetns to add to the HIT. Must be between 1 and 1000000000.
add.seconds
An optional character string containing the amount of time to extend the HIT, in seconds (for example, returned by seconds). Must be between 1 hour (3600 seconds) and 365 days.
unique.request.token
An optional character string, included only for advanced users.
keypair
A two-item character vector containing an AWS Access Key ID in the first position and the corresponding Secret Access Key in the second position. Set default with credentials.
print
Optionally print the results of the API request to the standard output. Default is TRUE.
browser
Optionally open the request in the default web browser, rather than opening in R. Default is FALSE.
log.requests
A logical specifying whether API requests should be logged. Default is TRUE. See readlogfile for details.
sandbox
Optionally execute the request in the MTurk sandbox rather than the live server. Default is FALSE.

Value

  • A dataframe containing the HITId, assignment increment, time increment, and whether each extension request was valid.

Details

A useful function for adding time and/or additional assignments to a HIT. If the HIT is already expired, this reactivates the HIT for the specified amount of time. If all assignments have already been submitted, this reactivates the HIT with the specified number of assignments and previously specified expiration. Must specify a HITId xor a HITTypeId. If multiple HITs or a HITTypeId are specified, each HIT is extended by the specified amount. extend() is an alias.

References

http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_ExtendHITOperation.html{API Reference}

See Also

CreateHIT ExpireHIT DisableHIT DisposeHIT

Examples

Run this code
ExtendHIT(hit="2MQB727M0IGF304GJ16S1F4VE3AYDQ",add.assignments="20")
ExtendHIT(hit="2MQB727M0IGF304GJ16S1F4VE3AYDQ",add.time=seconds(days=1)))

Run the code above in your browser using DataLab