listReviewableHITs method
Future<ListReviewableHITsResponse>
listReviewableHITs({
- String? hITTypeId,
- int? maxResults,
- String? nextToken,
- ReviewableHITStatus? status,
The ListReviewableHITs
operation retrieves the HITs with
Status equal to Reviewable or Status equal to Reviewing that belong to the
Requester calling the operation.
May throw ServiceFault. May throw RequestError.
Parameter hITTypeId
:
The ID of the HIT type of the HITs to consider for the query. If not
specified, all HITs for the Reviewer are considered
Parameter maxResults
:
Limit the number of results returned.
Parameter nextToken
:
Pagination Token
Parameter status
:
Can be either Reviewable
or Reviewing
.
Reviewable is the default value.
Implementation
Future<ListReviewableHITsResponse> listReviewableHITs({
String? hITTypeId,
int? maxResults,
String? nextToken,
ReviewableHITStatus? status,
}) async {
_s.validateStringLength(
'hITTypeId',
hITTypeId,
1,
64,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
255,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MTurkRequesterServiceV20170117.ListReviewableHITs'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (hITTypeId != null) 'HITTypeId': hITTypeId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (status != null) 'Status': status.toValue(),
},
);
return ListReviewableHITsResponse.fromJson(jsonResponse.body);
}