getContentById method

  1. @deprecated
Future<Content> getContentById({
  1. required String id,
  2. List<String>? status,
  3. int? version,
  4. String? embeddedContentRender,
  5. List<String>? expand,
  6. String? trigger,
})

Deprecated, use Confluence's v2 API.

Returns a single piece of content, like a page or a blog post.

By default, the following objects are expanded: space, history, version.

Permissions required: Permission to view the content. If the content is a blog post, 'View' permission for the space is required.

Implementation

@deprecated
Future<Content> getContentById(
    {required String id,
    List<String>? status,
    int? version,
    String? embeddedContentRender,
    List<String>? expand,
    String? trigger}) async {
  return Content.fromJson(await _client.send(
    'get',
    'wiki/rest/api/content/{id}',
    pathParameters: {
      'id': id,
    },
    queryParameters: {
      if (status != null) 'status': status.map((e) => e).join(','),
      if (version != null) 'version': '$version',
      if (embeddedContentRender != null)
        'embeddedContentRender': embeddedContentRender,
      if (expand != null) 'expand': expand.map((e) => e).join(','),
      if (trigger != null) 'trigger': trigger,
    },
  ));
}