updateHITReviewStatus method
The UpdateHITReviewStatus
operation updates the status of a
HIT. If the status is Reviewable, this operation can update the status to
Reviewing, or it can revert a Reviewing HIT back to the Reviewable status.
May throw ServiceFault. May throw RequestError.
Parameter hITId
:
The ID of the HIT to update.
Parameter revert
:
Specifies how to update the HIT status. Default is False
.
-
Setting this to false will only transition a HIT from
Reviewable
toReviewing
-
Setting this to true will only transition a HIT from
Reviewing
toReviewable
Implementation
Future<void> updateHITReviewStatus({
required String hITId,
bool? revert,
}) async {
ArgumentError.checkNotNull(hITId, 'hITId');
_s.validateStringLength(
'hITId',
hITId,
1,
64,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MTurkRequesterServiceV20170117.UpdateHITReviewStatus'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'HITId': hITId,
if (revert != null) 'Revert': revert,
},
);
}