YfyUserClient
class YfyUserClient extends YfyBaseApiClient
Class YfyUserClient
Constants
API_PREFIX |
|
SELF_INFO_URI |
|
USER_INFO_URI |
|
PROFILE_PIC_DOWNLOAD_URI |
|
UPDATE_SELF_URI |
|
SEARCH_USER_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.
array
getSelf()
返回用户个人信息
array
getUser(int $userId)
返回指定用户信息
void|DownloadFile
downloadProfilePic(string $userId, string $profilePicKey, string $savePath = null)
下载用户头像
mixed
updateSelf(string $name)
更新用户信息
mixed
searchUser(string $queryWords = null, int $pageId)
搜索用户
Details
at line 36
__construct(YfyContext $yfyContext, YfyHttpClient $httpClient, OAuthClient $oauthClient)
YfyUserClient constructor.
in YfyBaseApiClient at line 61
protected YfyRawResponse
execute(YfyRequest $yfyRequest)
执行请求, 调用realExecute, 封装了重试的逻辑
in YfyBaseApiClient at line 93
protected YfyRawResponse
realExecute(YfyRequest $yfyRequest)
真正执行请求的函数 会进行所有错误处理
at line 47
array
getSelf()
返回用户个人信息
at line 65
array
getUser(int $userId)
返回指定用户信息
at line 87
void|DownloadFile
downloadProfilePic(string $userId, string $profilePicKey, string $savePath = null)
下载用户头像
at line 113
mixed
updateSelf(string $name)
更新用户信息
at line 135
mixed
searchUser(string $queryWords = null, int $pageId)
搜索用户