getContentsWithState method

Future<ContentArray> getContentsWithState({
  1. required String spaceKey,
  2. required int stateId,
  3. List<String>? expand,
  4. int? limit,
  5. int? start,
})

Finds paginated content with

Permissions required: Space View Permission

Implementation

Future<ContentArray> getContentsWithState(
    {required String spaceKey,
    required int stateId,
    List<String>? expand,
    int? limit,
    int? start}) async {
  return ContentArray.fromJson(await _client.send(
    'get',
    'wiki/rest/api/space/{spaceKey}/state/content',
    pathParameters: {
      'spaceKey': spaceKey,
    },
    queryParameters: {
      'state-id': '$stateId',
      if (expand != null) 'expand': expand.map((e) => e).join(','),
      if (limit != null) 'limit': '$limit',
      if (start != null) 'start': '$start',
    },
  ));
}