getRestrictions method

Future<ContentRestrictionArray> getRestrictions({
  1. required String id,
  2. List<String>? expand,
  3. int? start,
  4. int? limit,
})

Returns the restrictions on a piece of content.

Permissions required: Permission to view the content.

Implementation

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