getCustomContentVersions method

Future<MultiEntityResult<CustomContentVersion>> getCustomContentVersions({
  1. required int customContentId,
  2. String? bodyFormat,
  3. String? cursor,
  4. int? limit,
  5. String? sort,
})

Returns the versions of specific custom content.

Permissions required: Permission to view the custom content and its corresponding page and space.

Implementation

Future<MultiEntityResult<CustomContentVersion>> getCustomContentVersions(
    {required int customContentId,
    String? bodyFormat,
    String? cursor,
    int? limit,
    String? sort}) async {
  return MultiEntityResult.fromJson(
    await _client.send(
      'get',
      'custom-content/{custom-content-id}/versions',
      pathParameters: {
        'custom-content-id': '$customContentId',
      },
      queryParameters: {
        if (bodyFormat != null) 'body-format': bodyFormat,
        if (cursor != null) 'cursor': cursor,
        if (limit != null) 'limit': '$limit',
        if (sort != null) 'sort': sort,
      },
    ),
    reviver: (v) => CustomContentVersion.fromJson(v as Map<String, Object?>),
  );
}