getPages method

Future<MultiEntityResult<PageBulk>> getPages({
  1. List<int>? id,
  2. List<int>? spaceId,
  3. String? sort,
  4. List<String>? status,
  5. String? title,
  6. String? bodyFormat,
  7. String? cursor,
  8. int? limit,
  9. bool? serializeIdsAsStrings,
})

Returns all pages. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

Permissions required: Permission to access the Confluence site ('Can use' global permission). Only pages that the user has permission to view will be returned.

Implementation

Future<MultiEntityResult<PageBulk>> getPages(
    {List<int>? id,
    List<int>? spaceId,
    String? sort,
    List<String>? status,
    String? title,
    String? bodyFormat,
    String? cursor,
    int? limit,
    bool? serializeIdsAsStrings}) async {
  return MultiEntityResult.fromJson(
    await _client.send(
      'get',
      'pages',
      queryParameters: {
        if (id != null) 'id': id.map((e) => '$e').join(','),
        if (spaceId != null) 'space-id': spaceId.map((e) => '$e').join(','),
        if (sort != null) 'sort': sort,
        if (status != null) 'status': status.map((e) => e).join(','),
        if (title != null) 'title': title,
        if (bodyFormat != null) 'body-format': bodyFormat,
        if (cursor != null) 'cursor': cursor,
        if (limit != null) 'limit': '$limit',
        if (serializeIdsAsStrings != null)
          'serialize-ids-as-strings': '$serializeIdsAsStrings',
      },
    ),
    reviver: (v) => PageBulk.fromJson(v as Map<String, Object?>),
  );
}