listWorkerBlocks method
The ListWorkersBlocks
operation retrieves a list of Workers
who are blocked from working on your HITs.
May throw ServiceFault. May throw RequestError.
Parameter nextToken
:
Pagination token
Implementation
Future<ListWorkerBlocksResponse> listWorkerBlocks({
int? maxResults,
String? nextToken,
}) async {
_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.ListWorkerBlocks'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListWorkerBlocksResponse.fromJson(jsonResponse.body);
}