getSpaceById method

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

Returns a specific space.

Permissions required: Permission to view the space.

Implementation

Future<Space> getSpaceById(
    {required int id,
    String? descriptionFormat,
    bool? includeIcon,
    bool? serializeIdsAsStrings}) 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',
      if (serializeIdsAsStrings != null)
        'serialize-ids-as-strings': '$serializeIdsAsStrings',
    },
  ));
}