class Drives extends Resource (View source)

The "drives" collection of methods.

Typical usage is:

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

Methods

create(string $requestId, Drive $postBody, array $optParams = [])

Creates a shared drive. (drives.create)

delete(string $driveId, array $optParams = [])

Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items. (drives.delete)

get(string $driveId, array $optParams = [])

Gets a shared drive's metadata by ID. (drives.get)

hide(string $driveId, array $optParams = [])

Hides a shared drive from the default view. (drives.hide)

listDrives(array $optParams = [])

Lists the user's shared drives. This method accepts the q parameter, which is a search query combining one or more search terms. For more information, see the Search for shared drives guide. (drives.listDrives)

unhide(string $driveId, array $optParams = [])

Restores a shared drive to the default view. (drives.unhide)

update(string $driveId, Drive $postBody, array $optParams = [])

Updates the metadata for a shared drive. (drives.update)

Details

Drive create(string $requestId, Drive $postBody, array $optParams = [])

Creates a shared drive. (drives.create)

Parameters

string $requestId

Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a shared drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same shared drive. If the shared drive already exists a 409 error will be returned.

Drive $postBody
array $optParams

Optional parameters.

Return Value

Drive

Exceptions

Exception

delete(string $driveId, array $optParams = [])

Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items. (drives.delete)

Parameters

string $driveId

The ID of the shared drive.

array $optParams

Optional parameters.

Exceptions

Exception

Drive get(string $driveId, array $optParams = [])

Gets a shared drive's metadata by ID. (drives.get)

Parameters

string $driveId

The ID of the shared drive.

array $optParams

Optional parameters.

Return Value

Drive

Exceptions

Exception

Drive hide(string $driveId, array $optParams = [])

Hides a shared drive from the default view. (drives.hide)

Parameters

string $driveId

The ID of the shared drive.

array $optParams

Optional parameters.

Return Value

Drive

Exceptions

Exception

DriveList listDrives(array $optParams = [])

Lists the user's shared drives. This method accepts the q parameter, which is a search query combining one or more search terms. For more information, see the Search for shared drives guide. (drives.listDrives)

Parameters

array $optParams

Optional parameters.

Return Value

DriveList

Exceptions

Exception

Drive unhide(string $driveId, array $optParams = [])

Restores a shared drive to the default view. (drives.unhide)

Parameters

string $driveId

The ID of the shared drive.

array $optParams

Optional parameters.

Return Value

Drive

Exceptions

Exception

Drive update(string $driveId, Drive $postBody, array $optParams = [])

Updates the metadata for a shared drive. (drives.update)

Parameters

string $driveId

The ID of the shared drive.

Drive $postBody
array $optParams

Optional parameters.

Return Value

Drive

Exceptions

Exception