getCustomContentById method

Future<CustomContentSingle> getCustomContentById({
  1. required int id,
  2. String? bodyFormat,
  3. int? version,
})

Returns a specific piece of custom content.

Permissions required: Permission to view the custom content, the container of the custom content, and the corresponding space (if different from the container).

Implementation

Future<CustomContentSingle> getCustomContentById(
    {required int id, String? bodyFormat, int? version}) async {
  return CustomContentSingle.fromJson(await _client.send(
    'get',
    'custom-content/{id}',
    pathParameters: {
      'id': '$id',
    },
    queryParameters: {
      if (bodyFormat != null) 'body-format': bodyFormat,
      if (version != null) 'version': '$version',
    },
  ));
}