getCommentReactions method

Future<GetCommentReactionsOutput> getCommentReactions({
  1. required String commentId,
  2. int? maxResults,
  3. String? nextToken,
  4. String? reactionUserArn,
})

Returns information about reactions to a specified comment ID. Reactions from users who have been deleted will not be included in the count.

May throw CommentDoesNotExistException. May throw CommentIdRequiredException. May throw InvalidCommentIdException. May throw InvalidReactionUserArnException. May throw InvalidMaxResultsException. May throw InvalidContinuationTokenException. May throw CommentDeletedException.

Parameter commentId : The ID of the comment for which you want to get reactions information.

Parameter maxResults : A non-zero, non-negative integer used to limit the number of returned results. The default is the same as the allowed maximum, 1,000.

Parameter nextToken : An enumeration token that, when provided in a request, returns the next batch of the results.

Parameter reactionUserArn : Optional. The Amazon Resource Name (ARN) of the user or identity for which you want to get reaction information.

Implementation

Future<GetCommentReactionsOutput> getCommentReactions({
  required String commentId,
  int? maxResults,
  String? nextToken,
  String? reactionUserArn,
}) async {
  ArgumentError.checkNotNull(commentId, 'commentId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeCommit_20150413.GetCommentReactions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'commentId': commentId,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
      if (reactionUserArn != null) 'reactionUserArn': reactionUserArn,
    },
  );

  return GetCommentReactionsOutput.fromJson(jsonResponse.body);
}