putCommentReaction method

Future<void> putCommentReaction({
  1. required String commentId,
  2. required String reactionValue,
})

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 CommentDeletedException. May throw CommentDoesNotExistException. May throw CommentIdRequiredException. May throw InvalidCommentIdException. May throw InvalidReactionValueException. May throw ReactionLimitExceededException. May throw ReactionValueRequiredException.

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 CodeCommit, see the CodeCommit User Guide.

Implementation

Future<void> putCommentReaction({
  required String commentId,
  required String reactionValue,
}) async {
  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,
    },
  );
}