putCommentReaction method
Adds or updates a reaction to a specified comment for the user whose identity is used to make the request. You can only add or update a reaction for yourself. You cannot add, modify, or delete a reaction for another user.
May throw CommentDoesNotExistException. May throw CommentIdRequiredException. May throw InvalidCommentIdException. May throw InvalidReactionValueException. May throw ReactionValueRequiredException. May throw ReactionLimitExceededException. May throw CommentDeletedException.
Parameter commentId
:
The ID of the comment to which you want to add or update a reaction.
Parameter reactionValue
:
The emoji reaction you want to add or update. To remove a reaction,
provide a value of blank or null. You can also provide the value of none.
For information about emoji reaction values supported in AWS CodeCommit,
see the AWS
CodeCommit User Guide.
Implementation
Future<void> putCommentReaction({
required String commentId,
required String reactionValue,
}) async {
ArgumentError.checkNotNull(commentId, 'commentId');
ArgumentError.checkNotNull(reactionValue, 'reactionValue');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.PutCommentReaction'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'commentId': commentId,
'reactionValue': reactionValue,
},
);
}