class YfyCommentClient extends YfyBaseApiClient

Class YfyCommentClient

Constants

API_PREFIX

COMMENT_CREATE_URI

COMMENT_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
create(int $fileId, string $content)

创建评论

mixed
delete(int $commentId)

删除评论

Details

at line 29
__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 42
mixed create(int $fileId, string $content)

创建评论

Parameters

int $fileId 评论文件id
string $content 评论文本,长度不能超过1001个字符

Return Value

mixed

Exceptions

YfySdkException

at line 64
mixed delete(int $commentId)

删除评论

Parameters

int $commentId 评论id

Return Value

mixed

Exceptions

YfySdkException