getQualificationType method

Future<GetQualificationTypeResponse> getQualificationType({
  1. required String qualificationTypeId,
})

The GetQualificationTypeoperation retrieves information about a Qualification type using its ID.

May throw ServiceFault. May throw RequestError.

Parameter qualificationTypeId : The ID of the QualificationType.

Implementation

Future<GetQualificationTypeResponse> getQualificationType({
  required String qualificationTypeId,
}) async {
  ArgumentError.checkNotNull(qualificationTypeId, 'qualificationTypeId');
  _s.validateStringLength(
    'qualificationTypeId',
    qualificationTypeId,
    1,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'MTurkRequesterServiceV20170117.GetQualificationType'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'QualificationTypeId': qualificationTypeId,
    },
  );

  return GetQualificationTypeResponse.fromJson(jsonResponse.body);
}