class Revisions extends Resource (View source)

The "revisions" collection of methods.

Typical usage is:

 $driveService = new Google\Service\Drive(...);
 $revisions = $driveService->revisions;

Methods

delete(string $fileId, string $revisionId, array $optParams = [])

Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. (revisions.delete)

get(string $fileId, string $revisionId, array $optParams = [])

Gets a revision's metadata or content by ID. (revisions.get)

listRevisions(string $fileId, array $optParams = [])

Lists a file's revisions. (revisions.listRevisions)

update(string $fileId, string $revisionId, Revision $postBody, array $optParams = [])

Updates a revision with patch semantics. (revisions.update)

Details

delete(string $fileId, string $revisionId, array $optParams = [])

Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. (revisions.delete)

Parameters

string $fileId

The ID of the file.

string $revisionId

The ID of the revision.

array $optParams

Optional parameters.

Exceptions

Exception

Revision get(string $fileId, string $revisionId, array $optParams = [])

Gets a revision's metadata or content by ID. (revisions.get)

Parameters

string $fileId

The ID of the file.

string $revisionId

The ID of the revision.

array $optParams

Optional parameters.

Return Value

Revision

Exceptions

Exception

RevisionList listRevisions(string $fileId, array $optParams = [])

Lists a file's revisions. (revisions.listRevisions)

Parameters

string $fileId

The ID of the file.

array $optParams

Optional parameters.

Return Value

RevisionList

Exceptions

Exception

Revision update(string $fileId, string $revisionId, Revision $postBody, array $optParams = [])

Updates a revision with patch semantics. (revisions.update)

Parameters

string $fileId

The ID of the file.

string $revisionId

The ID of the revision.

Revision $postBody
array $optParams

Optional parameters.

Return Value

Revision

Exceptions

Exception