getRestrictionsForOperation method

Future<ContentRestriction> getRestrictionsForOperation({
  1. required String id,
  2. required String operationKey,
  3. List<String>? expand,
  4. int? start,
  5. int? limit,
})

Returns the restictions on a piece of content for a given operation (read or update).

Permissions required: Permission to view the content.

Implementation

Future<ContentRestriction> getRestrictionsForOperation(
    {required String id,
    required String operationKey,
    List<String>? expand,
    int? start,
    int? limit}) async {
  return ContentRestriction.fromJson(await _client.send(
    'get',
    'wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}',
    pathParameters: {
      'id': id,
      'operationKey': operationKey,
    },
    queryParameters: {
      if (expand != null) 'expand': expand.map((e) => e).join(','),
      if (start != null) 'start': '$start',
      if (limit != null) 'limit': '$limit',
    },
  ));
}