Learn R Programming

MTurkR (version 0.8.0)

GetBonuses: Get Bonus Payments

Description

Get details of bonuses paid to workers, by HIT, HITType, or Assignment.

Usage

GetBonuses(assignment = NULL, hit = NULL, hit.type = NULL, annotation = NULL,
           return.all = TRUE, pagenumber = "1", pagesize = "100",
           verbose = getOption('MTurkR.verbose', TRUE), ...)

Arguments

assignment

An optional character string containing an AssignmentId whose bonuses should be returned. Must specify assignment xor hit xor hit.type xor annotation.

hit

An optional character string containing a HITId whose bonuses should be returned. Must specify assignment xor hit xor hit.type xor annotation.

hit.type

An optional character string containing a HITTypeId (or a vector of HITTypeIds) whose bonuses should be returned. Must specify assignment xor hit xor hit.type xor annotation.

annotation

An optional character string specifying the value of the RequesterAnnotation field for a batch of HITs. This can be used to retrieve bonuses for all HITs from a “batch” created in the online Requester User Interface (RUI). To use a batch ID, the batch must be written in a character string of the form “BatchId:78382;”, where “73832” is the batch ID shown in the RUI. Must specify assignment xor hit xor hit.type xor annotation.

return.all

A logical indicating whether all HITs (as opposed to a specified page of the search results) should be returned. Default is TRUE. Note: This is (temporarily) ignored.

pagenumber

An optional character string indicating which page of search results should be returned. Most users can ignore this.

pagesize

An optional character string indicating how many search results should be returned by each request, between 1 and 100. Most users can ignore this.

verbose

Optionally print the results of the API request to the standard output. Default is taken from getOption('MTurkR.verbose', TRUE).

...

Additional arguments passed to request.

Value

A data frame containing the details of each bonus, specifically: AssignmentId, WorkerId, Amount, CurrencyCode, FormattedPrice, Reason, and GrantTime.

Details

Retrieve bonuses previously paid to a specified HIT, Assignment, or HITType.

bonuses() is an alias.

References

API Reference

See Also

GrantBonus

Examples

Run this code
# NOT RUN {
# Get bonuses for a given assignment
GetBonuses(assignment = "26XXH0JPPSI23H54YVG7BKLO82DHNU")

# Get all bonuses for a given HIT
GetBonuses(hit = "2MQB727M0IGF304GJ16S1F4VE3AYDQ")

# Get bonuses from all HITs of a given batch from the RUI
GetBonuses(annotation="BatchId:78382;")
# }

Run the code above in your browser using DataLab