createInlineComment method

Future<InlineCommentModel> createInlineComment({
  1. bool? serializeIdsAsStrings,
  2. required CreateInlineCommentModel body,
})

Create an inline comment. This can be at the top level (specifying pageId or blogPostId in the request body) or as a reply (specifying parentCommentId in the request body). Note the inlineCommentProperties object in the request body is used to select the text the inline comment should be tied to. This is what determines the text highlighting when viewing a page in Confluence.

Permissions required: Permission to view the content of the page or blogpost and its corresponding space. Permission to create comments in the space.

Implementation

Future<InlineCommentModel> createInlineComment(
    {bool? serializeIdsAsStrings,
    required CreateInlineCommentModel body}) async {
  return InlineCommentModel.fromJson(await _client.send(
    'post',
    'inline-comments',
    queryParameters: {
      if (serializeIdsAsStrings != null)
        'serialize-ids-as-strings': '$serializeIdsAsStrings',
    },
    body: body.toJson(),
  ));
}