list method

Future<ChangeList> list({
  1. String? driveId,
  2. bool? includeCorpusRemovals,
  3. bool? includeDeleted,
  4. bool? includeItemsFromAllDrives,
  5. String? includeLabels,
  6. String? includePermissionsForView,
  7. bool? includeSubscribed,
  8. bool? includeTeamDriveItems,
  9. int? maxResults,
  10. String? pageToken,
  11. String? spaces,
  12. String? startChangeId,
  13. bool? supportsAllDrives,
  14. bool? supportsTeamDrives,
  15. String? teamDriveId,
  16. String? $fields,
})

Lists the changes for a user or shared drive.

Request parameters:

driveId - The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.

includeCorpusRemovals - Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.

includeDeleted - Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.

includeItemsFromAllDrives - Whether both My Drive and shared drive items should be included in results.

includeLabels - A comma-separated list of IDs of labels to include in the labelInfo part of the response.

includePermissionsForView - Specifies which additional view's permissions to include in the response. Only published is supported.

includeSubscribed - Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result.

includeTeamDriveItems - Deprecated: Use includeItemsFromAllDrives instead.

maxResults - Maximum number of changes to return.

pageToken - The token for continuing a previous list request on the next page. This should be set to the value of nextPageToken from the previous response or to the response from the getStartPageToken method.

spaces - A comma-separated list of spaces to query. Supported values are drive, appDataFolder and photos.

startChangeId - Deprecated: Use pageToken instead.

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 ChangeList.

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<ChangeList> list({
  core.String? driveId,
  core.bool? includeCorpusRemovals,
  core.bool? includeDeleted,
  core.bool? includeItemsFromAllDrives,
  core.String? includeLabels,
  core.String? includePermissionsForView,
  core.bool? includeSubscribed,
  core.bool? includeTeamDriveItems,
  core.int? maxResults,
  core.String? pageToken,
  core.String? spaces,
  core.String? startChangeId,
  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 (includeCorpusRemovals != null)
      'includeCorpusRemovals': ['${includeCorpusRemovals}'],
    if (includeDeleted != null) 'includeDeleted': ['${includeDeleted}'],
    if (includeItemsFromAllDrives != null)
      'includeItemsFromAllDrives': ['${includeItemsFromAllDrives}'],
    if (includeLabels != null) 'includeLabels': [includeLabels],
    if (includePermissionsForView != null)
      'includePermissionsForView': [includePermissionsForView],
    if (includeSubscribed != null)
      'includeSubscribed': ['${includeSubscribed}'],
    if (includeTeamDriveItems != null)
      'includeTeamDriveItems': ['${includeTeamDriveItems}'],
    if (maxResults != null) 'maxResults': ['${maxResults}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (spaces != null) 'spaces': [spaces],
    if (startChangeId != null) 'startChangeId': [startChangeId],
    if (supportsAllDrives != null)
      'supportsAllDrives': ['${supportsAllDrives}'],
    if (supportsTeamDrives != null)
      'supportsTeamDrives': ['${supportsTeamDrives}'],
    if (teamDriveId != null) 'teamDriveId': [teamDriveId],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'changes';

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