getSpaceById method

Future<Space> getSpaceById({
  1. required int id,
  2. String? descriptionFormat,
  3. bool? includeIcon,
})

Returns a specific space.

Permissions required: Permission to view the space.

Implementation

Future<Space> getSpaceById(
    {required int id, String? descriptionFormat, bool? includeIcon}) async {
  return Space.fromJson(await _client.send(
    'get',
    'spaces/{id}',
    pathParameters: {
      'id': '$id',
    },
    queryParameters: {
      if (descriptionFormat != null) 'description-format': descriptionFormat,
      if (includeIcon != null) 'include-icon': '$includeIcon',
    },
  ));
}