class YfyTrashClient extends YfyBaseApiClient

Class YfyTrashClient

Constants

API_PREFIX

TRASH_LIST_URI

TRASH_CLEAR_URI

TRASH_RESTORE_ALL_URI

Properties

protected YfyContext $yfyContext from YfyBaseApiClient
protected YfyHttpClient $httpClient from YfyBaseApiClient
protected OAuthClient $oauthClient from YfyBaseApiClient

Methods

__construct(YfyContext $yfyContext, YfyHttpClient $httpClient, OAuthClient $oauthClient)

YfyUserClient constructor.

execute(YfyRequest $yfyRequest)

执行请求, 调用realExecute, 封装了重试的逻辑

realExecute(YfyRequest $yfyRequest)

真正执行请求的函数 会进行所有错误处理

mixed
listItems(int $pageId, int $pageCapacity = 20, string $type = YfyItemType::ITEM)

获取回收站中的文件和文件夹列表

mixed
clear(string $type = YfyItemType::ITEM)

清空回收站

mixed
restoreAll(string $type = YfyItemType::ITEM)

从回收站恢复所有文件/文件夹

Details

at line 32
__construct(YfyContext $yfyContext, YfyHttpClient $httpClient, OAuthClient $oauthClient)

YfyUserClient constructor.

Parameters

YfyContext $yfyContext
YfyHttpClient $httpClient
OAuthClient $oauthClient

in YfyBaseApiClient at line 61
protected YfyRawResponse execute(YfyRequest $yfyRequest)

执行请求, 调用realExecute, 封装了重试的逻辑

Parameters

YfyRequest $yfyRequest

Return Value

YfyRawResponse

Exceptions

YfySdkException

in YfyBaseApiClient at line 93
protected YfyRawResponse realExecute(YfyRequest $yfyRequest)

真正执行请求的函数 会进行所有错误处理

at line 49
mixed listItems(int $pageId, int $pageCapacity = 20, string $type = YfyItemType::ITEM)

获取回收站中的文件和文件夹列表

Parameters

int $pageId 页码, 默认为0
int $pageCapacity 页容量, 默认为20
string $type item类型, 只能是Fangcloud\Constant\YfyItemType中定义的常量

Return Value

mixed

Exceptions

YfySdkException
InvalidArgumentException

See also

YfyItemType

at line 73
mixed clear(string $type = YfyItemType::ITEM)

清空回收站

Parameters

string $type item类型, 只能是Fangcloud\Constant\YfyItemType中定义的常量

Return Value

mixed

Exceptions

YfySdkException
InvalidArgumentException

See also

YfyItemType

at line 98
mixed restoreAll(string $type = YfyItemType::ITEM)

从回收站恢复所有文件/文件夹

Parameters

string $type item类型, 只能是Fangcloud\Constant\YfyItemType中定义的常量

Return Value

mixed

Exceptions

YfySdkException
InvalidArgumentException

See also

YfyItemType