list method

Future<Acl> list(
  1. String calendarId, {
  2. int? maxResults,
  3. String? pageToken,
  4. bool? showDeleted,
  5. String? syncToken,
  6. String? $fields,
})

Returns the rules in the access control list for the calendar.

Request parameters:

calendarId - Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

maxResults - Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.

pageToken - Token specifying which result page to return. Optional.

showDeleted - Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False.

syncToken - Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All entries deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Acl.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<Acl> list(
  core.String calendarId, {
  core.int? maxResults,
  core.String? pageToken,
  core.bool? showDeleted,
  core.String? syncToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (maxResults != null) 'maxResults': ['${maxResults}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (showDeleted != null) 'showDeleted': ['${showDeleted}'],
    if (syncToken != null) 'syncToken': [syncToken],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'calendars/' + commons.escapeVariable('$calendarId') + '/acl';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return Acl.fromJson(response_ as core.Map<core.String, core.dynamic>);
}