class YfyCollabClient extends YfyBaseApiClient

Class YfyCollabClient

Constants

API_PREFIX

COLLAB_INVITE_URI

COLLAB_INFO_URI

COLLAB_UPDATE_URI

COLLAB_DELETE_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
invite(int $folderId, int $userId, string $userRole, string $message = null)

邀请协作

mixed
getInfo(int $collabId)

获取协作信息

mixed
update(int $collabId, string $role)

更新协作

mixed
delete(int $collabId)

删除协作

Details

at line 34
__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 52
mixed invite(int $folderId, int $userId, string $userRole, string $message = null)

邀请协作

Parameters

int $folderId 协作文件夹id
int $userId 邀请用户id
string $userRole 邀请用户角色, 只能是Fangcloud\Constant\YfyCollabRole中定义的常量
string $message 邀请信息,长度不能超过140个字符

Return Value

mixed

Exceptions

YfySdkException
InvalidArgumentException

See also

YfyCollabRole

at line 79
mixed getInfo(int $collabId)

获取协作信息

Parameters

int $collabId 协作id

Return Value

mixed

Exceptions

YfySdkException

at line 101
mixed update(int $collabId, string $role)

更新协作

Parameters

int $collabId 协作id
string $role 用户角色, 只能是Fangcloud\Constant\YfyCollabRole中定义的常量

Return Value

mixed

Exceptions

YfySdkException
InvalidArgumentException

See also

YfyCollabRole

at line 124
mixed delete(int $collabId)

删除协作

Parameters

int $collabId 协作id

Return Value

mixed

Exceptions

YfySdkException