getContentChildren method

  1. @deprecated
Future<ContentChildren> getContentChildren({
  1. required String id,
  2. List<String>? expand,
  3. int? parentVersion,
})

Deprecated, use Confluence's v2 API.

Returns a map of the direct children of a piece of content. A piece of content has different types of child content, depending on its type. These are the default parent-child content type relationships:

  • page: child content is page, comment, attachment
  • blogpost: child content is comment, attachment
  • attachment: child content is comment
  • comment: child content is attachment

Apps can override these default relationships. Apps can also introduce new content types that create new parent-child content relationships.

Note, the map will always include all child content types that are valid for the content. However, if the content has no instances of a child content type, the map will contain an empty array for that child content type.

Permissions required: 'View' permission for the space, and permission to view the content if it is a page.

Implementation

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