getStartPageToken method

Future<StartPageToken> getStartPageToken({
  1. String? driveId,
  2. bool? supportsAllDrives,
  3. bool? supportsTeamDrives,
  4. String? teamDriveId,
  5. String? $fields,
})

Gets the starting pageToken for listing future changes.

Request parameters:

driveId - The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.

supportsAllDrives - Whether the requesting application supports both My Drives and shared drives.

supportsTeamDrives - Deprecated: Use supportsAllDrives instead.

teamDriveId - Deprecated: Use driveId instead.

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

Completes with a StartPageToken.

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<StartPageToken> getStartPageToken({
  core.String? driveId,
  core.bool? supportsAllDrives,
  core.bool? supportsTeamDrives,
  core.String? teamDriveId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (driveId != null) 'driveId': [driveId],
    if (supportsAllDrives != null)
      'supportsAllDrives': ['${supportsAllDrives}'],
    if (supportsTeamDrives != null)
      'supportsTeamDrives': ['${supportsTeamDrives}'],
    if (teamDriveId != null) 'teamDriveId': [teamDriveId],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'changes/startPageToken';

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