listReviewPolicyResultsForHIT method
The ListReviewPolicyResultsForHIT operation retrieves the
computed results and the actions taken in the course of executing your
Review Policies for a given HIT. For information about how to specify
Review Policies when you call CreateHIT, see Review Policies. The
ListReviewPolicyResultsForHIT operation can return results for both
Assignment-level and HIT-level review results.
May throw RequestError.
May throw ServiceFault.
Parameter hITId :
The unique identifier of the HIT to retrieve review results for.
Parameter maxResults :
Limit the number of results returned.
Parameter nextToken :
Pagination token
Parameter policyLevels :
The Policy Level(s) to retrieve review results for - HIT or Assignment. If
omitted, the default behavior is to retrieve all data for both policy
levels. For a list of all the described policies, see Review Policies.
Parameter retrieveActions :
Specify if the operation should retrieve a list of the actions taken
executing the Review Policies and their outcomes.
Parameter retrieveResults :
Specify if the operation should retrieve a list of the results computed by
the Review Policies.
Implementation
Future<ListReviewPolicyResultsForHITResponse> listReviewPolicyResultsForHIT({
required String hITId,
int? maxResults,
String? nextToken,
List<ReviewPolicyLevel>? policyLevels,
bool? retrieveActions,
bool? retrieveResults,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'MTurkRequesterServiceV20170117.ListReviewPolicyResultsForHIT'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'HITId': hITId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (policyLevels != null)
'PolicyLevels': policyLevels.map((e) => e.value).toList(),
if (retrieveActions != null) 'RetrieveActions': retrieveActions,
if (retrieveResults != null) 'RetrieveResults': retrieveResults,
},
);
return ListReviewPolicyResultsForHITResponse.fromJson(jsonResponse.body);
}