目录

Drive

Class Info

public class Drive extends AbstractJsonClient

Drive Kit implementation class, which manages files on drives, including file upload, download, search, and change detection.

AbstractJsonClient: abstract JSON client.

Nested Class Summary

Qualifier and Type

Class Name and Description

class

Drive.About

Declaration of the Drive.About class.

static class

Drive.Builder

Class for constructing a Drive.Builder object.

class

Drive.Changes

Declaration of the Drive.Changes class.

class

Drive.Channels

Declaration of the Drive.Channels class.

class

Drive.Comments

Declaration of the Drive.Comments class.

class

Drive.Files

Declaration of the Drive.Files class.

class

Drive.HistoryVersions

Declaration of the Drive.HistoryVersions class.

class

Drive.Permissions

Declaration of the Drive.Permissions class.

class

Drive.Replies

Declaration of the Drive.Replies class.

Public Constructor Summary

Constructor Name

Drive(DriveCredential credential, Context context)

Constructs a Drive object.

Protected Constructor Summary

Constructor Name

Drive(Drive.Builder builder)

Constructs a Drive object.

Public Method Summary

Qualifier and Type

Method Name and Description

Drive.About

about()

Obtains an object for creating requests from the Drive.About class.

BatchRequest

batch()

Obtains the batch API of Drive Kit. (This method is provided by the parent class and can be directly called.)

Drive.Changes

changes()

Obtains an object for creating requests from the Drive.Changes class.

Drive.Channels

channels()

Obtains an object for creating requests from the Drive.Channels class.

Drive.Comments

comments()

Obtains an object for creating requests from the Drive.Comments class.

Drive.Files

files()

Obtains an object for creating requests from the Drive.Files class.

Drive.HistoryVersions

historyVersions()

Obtains an object for creating requests from the Drive.HistoryVersions class.

Drive.Permissions

permissions()

Obtains an object for creating requests from the Drive.Permissions class.

Drive.Replies

replies()

Obtains an object for creating requests from the Drive.Replies class.

Protected Method Summary

Qualifier and Type

Method Name and Description

void

initialize(AbstractClientRequest<?> httpClientRequest)

Public Constructors

[h2]Drive

Constructor

public Drive(DriveCredential credential, android.content.Context context)

Constructs a Drive object.

Parameters

Name

Description

credential

Device credential with information such as the user ID and country or region code.

context

App context.

Protected Constructors

[h2]Drive

Constructor

protected Drive(Drive.Builder builder)

Constructs a Drive object.

Parameters

Name

Description

builder

Builder for constructing an object.

Public Methods

[h2]about

Method

public Drive.About about()

Obtains an object for creating requests from the Drive.About class.

Returns

Type

Description

Drive.About

A Drive.About object.

[h2]changes

Method

public Drive.Changes changes()

Obtains an object for creating requests from the Drive.Changes class.

Returns

Type

Description

Drive.Changes

The Drive.Changes.Subscribe class extends DriveRequest<Channel>. Therefore, the return result of the execute method is encapsulated as a Changes object.

[h2]channels

Method

public Drive.Channels channels()

Obtains an object for creating requests from the Drive.Channels class.

Returns

Type

Description

Drive.Channels

A Drive.Channels object.

[h2]files

Method

public Drive.Files files()

Obtains an object for creating requests from the Drive.Files class.

Returns

Type

Description

Drive.Files

A Drive.Files object.

[h2]comments

Method

public Drive.Comments comments()

Obtains an object for creating requests from the Drive.Comments class.

Returns

Type

Description

Drive.Comments

A Drive.Comments object.

[h2]replies

Method

public Drive.Replies replies()

Obtains an object for creating requests from the Drive.Replies class.

Returns

Type

Description

Drive.Replies

A Drive.Replies object.

[h2]historyVersions

Method

public Drive.HistoryVersions historyVersions()

Obtains an object for creating requests from the Drive.HistoryVersions class.

Returns

Type

Description

Drive.HistoryVersions

A Drive.HistoryVersions object.

[h2]batch

Method

public final BatchRequest batch()

Obtains the batch API of Drive Kit. (This method is provided by the parent class and can be directly called.)

Returns

Type

Description

BatchRequest

A BatchRequest object.

Protected Methods

[h2]initialize

Method

protected void initialize(AbstractClientRequest<?> httpClientRequest)

Initializes AbstractClientRequest using ClientRequestInitializer.

Parameters

Name

Description

httpClientRequest

AbstractClientRequest object.

Throws

Name

Description

java.io.IOException

I/O exception thrown upon an API call failure. You can use the getMessage method to obtain the error description.