class YfyItemClient extends YfyBaseApiClient

Class YfyItemClient

Constants

API_PREFIX

ITEM_SEARCH_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
search(string $queryWords, string $type = YfyItemType::ITEM, int $pageId, int $searchInFolder = null)

搜索

Details

at line 30
__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)

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

搜索

Parameters

string $queryWords 搜索关键词
string $type 搜索类型,只能是Fangcloud\Constant\YfyItemType中定义的常量
int $pageId 页码
int $searchInFolder 指定父文件夹

Return Value

mixed

Exceptions

YfySdkException
InvalidArgumentException

See also

YfyItemType