list method

Future<TeamDriveList> list({
  1. int? pageSize,
  2. String? pageToken,
  3. String? q,
  4. bool? useDomainAdminAccess,
  5. String? $fields,
})

Deprecated: Use drives.list instead.

Request parameters:

pageSize - Maximum number of Team Drives to return. Value must be between "1" and "100".

pageToken - Page token for Team Drives.

q - Query string for searching Team Drives.

useDomainAdminAccess - Issue the request as a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned.

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

Completes with a TeamDriveList.

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<TeamDriveList> list({
  core.int? pageSize,
  core.String? pageToken,
  core.String? q,
  core.bool? useDomainAdminAccess,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (q != null) 'q': [q],
    if (useDomainAdminAccess != null)
      'useDomainAdminAccess': ['${useDomainAdminAccess}'],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'teamdrives';

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