Learn R Programming

MTurkR (version 0.2)

SendTestEventNotification: Test a Notification

Description

Test a HITType Notification, for example, to try out a HITType Notification before creating a HIT.

Usage

SendTestEventNotification(	notification, test.event.type, 
							keypair = credentials(), print = TRUE, browser = FALSE, 
							log.requests = TRUE, sandbox = FALSE)

Arguments

notification
A character string containing a URL query parameter-formatted Notification structure (e.g., returned by GenerateNotification).
test.event.type
A character string containing one of: AssignmentAccepted, AssignmentAbandoned, AssignmentReturned, AssignmentSubmitted, HITReviewable, HITExpired (the default), Ping
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

  • Potentially an email sent to the email address specified in the notification parameter. Otherwise, nothing

Details

Test a Notification configuration. The test mimics whatever the Notification configuration will do when the event described in test.event.type occurs. notificationtest() is an alias.

References

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

See Also

GenerateNotification SetHITTypeNotification

Examples

Run this code
a <- GenerateNotification("requester@example.com",event.type="HITExpired")
SendTestEventNotification(a,test.event.type="HITReviewable") # no notification email will be sent
SendTestEventNotification(a,test.event.type="HITExpired") # notification email will be sent

Run the code above in your browser using DataLab