get method

Future<Change> get(
  1. String changeId, {
  2. String? driveId,
  3. bool? supportsAllDrives,
  4. bool? supportsTeamDrives,
  5. String? teamDriveId,
  6. String? $fields,
})

Deprecated: Use changes.getStartPageToken and changes.list to retrieve recent changes.

Request parameters:

changeId - The ID of the change.

driveId - The shared drive from which the change 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 Change.

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<Change> get(
  core.String changeId, {
  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],
  };

  final url_ = 'changes/' + commons.escapeVariable('$changeId');

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