getSpaces method

  1. @deprecated
Future<SpaceArray> getSpaces({
  1. List<String>? spaceKey,
  2. List<int>? spaceId,
  3. String? type,
  4. String? status,
  5. List<String>? label,
  6. bool? favourite,
  7. String? favouriteUserKey,
  8. List<String>? expand,
  9. int? start,
  10. int? limit,
})

Deprecated, use Confluence's v2 API.

Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key.

Permissions required: Permission to access the Confluence site ('Can use' global permission). Note, the returned list will only contain spaces that the current user has permission to view.

Implementation

@deprecated
Future<SpaceArray> getSpaces(
    {List<String>? spaceKey,
    List<int>? spaceId,
    String? type,
    String? status,
    List<String>? label,
    bool? favourite,
    String? favouriteUserKey,
    List<String>? expand,
    int? start,
    int? limit}) async {
  return SpaceArray.fromJson(await _client.send(
    'get',
    'wiki/rest/api/space',
    queryParameters: {
      if (spaceKey != null) 'spaceKey': spaceKey.map((e) => e).join(','),
      if (spaceId != null) 'spaceId': spaceId.map((e) => '$e').join(','),
      if (type != null) 'type': type,
      if (status != null) 'status': status,
      if (label != null) 'label': label.map((e) => e).join(','),
      if (favourite != null) 'favourite': '$favourite',
      if (favouriteUserKey != null) 'favouriteUserKey': favouriteUserKey,
      if (expand != null) 'expand': expand.map((e) => e).join(','),
      if (start != null) 'start': '$start',
      if (limit != null) 'limit': '$limit',
    },
  ));
}