getContentChildrenByType method

  1. @deprecated
Future<ContentArray> getContentChildrenByType({
  1. required String id,
  2. required String type,
  3. List<String>? expand,
  4. int? parentVersion,
  5. int? start,
  6. int? limit,
})

Deprecated, use Confluence's v2 API.

Returns all children of a given type, for a piece of content. A piece of content has different types of child content, depending on its type:

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

Custom content types that are provided by apps can also be returned.

Note, this method only returns direct children. To return children at all levels, use Get descendants by type.

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

Implementation

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