getSpaces method
Returns all spaces. The results will be sorted by id ascending. 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 spaces that the user has permission to view will be returned.
Implementation
Future<MultiEntityResult<Space>> getSpaces(
{List<int>? ids,
List<String>? keys,
String? type,
String? status,
List<String>? labels,
String? sort,
String? descriptionFormat,
bool? includeIcon,
String? cursor,
int? limit,
bool? serializeIdsAsStrings}) async {
return MultiEntityResult.fromJson(
await _client.send(
'get',
'spaces',
queryParameters: {
if (ids != null) 'ids': ids.map((e) => '$e').join(','),
if (keys != null) 'keys': keys.map((e) => e).join(','),
if (type != null) 'type': type,
if (status != null) 'status': status,
if (labels != null) 'labels': labels.map((e) => e).join(','),
if (sort != null) 'sort': sort,
if (descriptionFormat != null)
'description-format': descriptionFormat,
if (includeIcon != null) 'include-icon': '$includeIcon',
if (cursor != null) 'cursor': cursor,
if (limit != null) 'limit': '$limit',
if (serializeIdsAsStrings != null)
'serialize-ids-as-strings': '$serializeIdsAsStrings',
},
),
reviver: (v) => Space.fromJson(v as Map<String, Object?>),
);
}