createWorkerBlock method
The CreateWorkerBlock operation allows you to prevent a
Worker from working on your HITs. For example, you can block a Worker who
is producing poor quality work. You can block up to 100,000 Workers.
May throw RequestError.
May throw ServiceFault.
Parameter reason :
A message explaining the reason for blocking the Worker. This parameter
enables you to keep track of your Workers. The Worker does not see this
message.
Parameter workerId :
The ID of the Worker to block.
Implementation
Future<void> createWorkerBlock({
required String reason,
required String workerId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MTurkRequesterServiceV20170117.CreateWorkerBlock'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Reason': reason,
'WorkerId': workerId,
},
);
}