acceptQualificationRequest method
The AcceptQualificationRequest
operation approves a Worker's
request for a Qualification.
Only the owner of the Qualification type can grant a Qualification request for that type.
A successful request for the AcceptQualificationRequest
operation returns with no errors and an empty body.
May throw ServiceFault. May throw RequestError.
Parameter qualificationRequestId
:
The ID of the Qualification request, as returned by the
GetQualificationRequests
operation.
Parameter integerValue
:
The value of the Qualification. You can omit this value if you are using
the presence or absence of the Qualification as the basis for a HIT
requirement.
Implementation
Future<void> acceptQualificationRequest({
required String qualificationRequestId,
int? integerValue,
}) async {
ArgumentError.checkNotNull(
qualificationRequestId, 'qualificationRequestId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'MTurkRequesterServiceV20170117.AcceptQualificationRequest'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'QualificationRequestId': qualificationRequestId,
if (integerValue != null) 'IntegerValue': integerValue,
},
);
}