getAssignment method
The GetAssignment operation retrieves the details of the
specified Assignment.
May throw RequestError.
May throw ServiceFault.
Parameter assignmentId :
The ID of the Assignment to be retrieved.
Implementation
Future<GetAssignmentResponse> getAssignment({
required String assignmentId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MTurkRequesterServiceV20170117.GetAssignment'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AssignmentId': assignmentId,
},
);
return GetAssignmentResponse.fromJson(jsonResponse.body);
}