目录

Drive

Class Info

public class Drive extends AbstractJsonClient

华为Drive服务实现类,负责管理云端硬盘中的文件,包括上传,下载,搜索,检测更改等。

AbstractJsonClient 抽象JSON客户端

Nested Class Summary

Qualifier and Type

Class Name and Description

class

Drive.About

Drive.About类声明。

static class

Drive.Builder

Drive类对象构造类。

class

Drive.Changes

Drive.Changes类声明。

class

Drive.Channels

Drive.Channels类声明。

class

Drive.Comments

Drive.Comments类声明。

class

Drive.Files

Drive.Files类声明。

class

Drive.HistoryVersions

Drive.HistoryVersions类声明。

class

Drive.Permissions

Drive.Permissions类声明。

class

Drive.Replies

Drive.Replies类声明。

Public Constructor Summary

Constructor Name

Drive(DriveCredential credential, Context context)

Drive构造方法。

Protected Constructor Summary

Constructor Name

Drive(Drive.Builder builder)

Drive构造方法。

Public Method Summary

Qualifier and Type

Method Name and Description

Drive.About

about()

获取封装About接口请求的访问对象。

BatchRequest

batch()

获取Drive批量接口(该方法是父类方法,可直接调用)。

Drive.Changes

changes()

获取创建Changes请求方法的访问对象。

Drive.Channels

channels()

获取Channels方法请求的访问对象。

Drive.Comments

comments()

获取Comments方法请求的访问对象。

Drive.Files

files()

获取Files请求的访问对象。

Drive.HistoryVersions

historyVersions()

获取HistoryVersions请求的访问对象。

Drive.Permissions

permissions()

获取Permissions请求的访问对象。

Drive.Replies

replies()

获取评论回复Replies请求的访问对象。

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)

构造一个Drive对象。

Parameters

Name

Description

credential

DriveCredential对象,设备凭证,包含用户ID、国家/地区代码等信息。

context

应用上下文。

Protected Constructors

[h2]Drive

Constructor

protected Drive(Drive.Builder builder)

构造一个Drive对象。

Parameters

Name

Description

builder

Builder构造对象。

Public Methods

[h2]about

Method

public Drive.About about()

获取封装Drive.About接口请求的对象。

Returns

Type

Description

Drive.About

返回一个Drive.About类对象。

[h2]changes

Method

public Drive.Changes changes()

获取创建Drive.Changes请求方法的访问对象。

Returns

Type

Description

Drive.Changes

Drive.Changes.Subscribe类继承自DriveRequest<Channel>,调用execute方法返回,返回结果封装为Changes对象。

[h2]channels

Method

public Drive.Channels channels()

获取Drive.Channels方法请求的访问对象。

Returns

Type

Description

Drive.Channels

返回一个Drive.Channels类对象。

[h2]files

Method

public Drive.Files files()

获取Drive.Files请求的访问对象。

Returns

Type

Description

Drive.Files

返回一个Drive.Files类对象。

[h2]comments

Method

public Drive.Comments comments()

获取Drive.Comments方法请求的访问对象。

Returns

Type

Description

Drive.Comments

返回一个Drive.Comments类对象。

[h2]replies

Method

public Drive.Replies replies()

获取Drive.Replies请求的访问对象。

Returns

Type

Description

Drive.Replies

返回一个Drive.Replies类对象。

[h2]historyVersions

Method

public Drive.HistoryVersions historyVersions()

获取Drive.HistoryVersions请求的访问对象。

Returns

Type

Description

Drive.HistoryVersions

返回一个Drive.HistoryVersions类对象。

[h2]batch

Method

public final BatchRequest batch()

获取Drive批量接口(该方法是父类方法,可直接调用)。

Returns

Type

Description

BatchRequest

返回批量请求,BatchRequest类对象。

Protected Methods

[h2]initialize

Method

protected void initialize(AbstractClientRequest<?> httpClientRequest)

通过ClientRequestInitializer初始化AbstractClientRequest。

Parameters

Name

Description

httpClientRequest

AbstractClientRequest对象。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage方法获取错误描述。