public class UserClient extends BaseClient
_baseUrl, _gson, _httpClient| 构造器和说明 |
|---|
UserClient(String appkey,
String masterSecret)
Create a User Client with default parameters.
|
UserClient(String appkey,
String masterSecret,
cn.jiguang.common.connection.HttpProxy proxy)
Create a User Client with a proxy.
|
UserClient(String appkey,
String masterSecret,
cn.jiguang.common.connection.HttpProxy proxy,
JMessageConfig config)
Create a User Client with custom config.
|
| 限定符和类型 | 方法和说明 |
|---|---|
cn.jiguang.common.resp.ResponseWrapper |
addBlackList(String username,
String... users)
Add Users to black list
|
cn.jiguang.common.resp.ResponseWrapper |
addFriends(String username,
String... users)
Add friends to username
|
cn.jiguang.common.resp.ResponseWrapper |
deleteFriends(String username,
String... users)
Delete friends
|
cn.jiguang.common.resp.ResponseWrapper |
deleteUser(String username) |
UserListResult |
getAdminListByAppkey(int start,
int count)
Get admins by appkey
|
UserInfoResult[] |
getBlackList(String username)
Get a user's all black list
|
UserInfoResult[] |
getFriendsInfo(String username)
Get friends'info from user
|
UserGroupsResult |
getGroupList(String username)
Get all groups of a user
|
UserInfoResult |
getUserInfo(String username) |
UserListResult |
getUserList(int start,
int count)
Get user list
|
UserStateResult |
getUserState(String username)
Get user state
|
cn.jiguang.common.resp.ResponseWrapper |
registerAdmins(RegisterInfo payload) |
cn.jiguang.common.resp.ResponseWrapper |
registerUsers(RegisterPayload payload) |
cn.jiguang.common.resp.ResponseWrapper |
removeBlackList(String username,
String... users) |
cn.jiguang.common.resp.ResponseWrapper |
setNoDisturb(String username,
NoDisturbPayload payload)
Set don't disturb service while receiving messages.
|
cn.jiguang.common.resp.ResponseWrapper |
updateFriendsNote(String username,
FriendNote[] array)
Update friends' note information.
|
cn.jiguang.common.resp.ResponseWrapper |
updatePassword(String username,
String password) |
cn.jiguang.common.resp.ResponseWrapper |
updateUserInfo(String username,
UserPayload payload) |
public UserClient(String appkey, String masterSecret)
appkey - The key of one application on JPush.masterSecret - API access secret of the appKey.public UserClient(String appkey, String masterSecret, cn.jiguang.common.connection.HttpProxy proxy)
appkey - The key of one application on JPush.masterSecret - API access secret of the appKey.proxy - The proxy, if there is no proxy, should be null.public UserClient(String appkey, String masterSecret, cn.jiguang.common.connection.HttpProxy proxy, JMessageConfig config)
appkey - The key of one application on JPush.masterSecret - API access secret of the appKey.proxy - The proxy, if there is no proxy, should be null.config - The client configuration. Can use JMessageConfig.getInstance() as default.public cn.jiguang.common.resp.ResponseWrapper registerUsers(RegisterPayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic cn.jiguang.common.resp.ResponseWrapper registerAdmins(RegisterInfo payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic UserInfoResult getUserInfo(String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic cn.jiguang.common.resp.ResponseWrapper updateUserInfo(String username, UserPayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic UserStateResult getUserState(String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessarycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper updatePassword(String username, String password) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic cn.jiguang.common.resp.ResponseWrapper deleteUser(String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic UserInfoResult[] getBlackList(String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - The owner of the black listcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper addBlackList(String username, String... users) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - The owner of the black listusers - The users that will add to black listcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper removeBlackList(String username, String... users) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic UserListResult getUserList(int start, int count) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
start - The start index of the listcount - The number that how many you want to get from listcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic UserListResult getAdminListByAppkey(int start, int count) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
start - The start index of the listcount - The number that how many you want to get from listcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper setNoDisturb(String username, NoDisturbPayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessarypayload - NoDisturbPayloadcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic UserGroupsResult getGroupList(String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessarycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper addFriends(String username, String... users) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessaryusers - username to be addcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper deleteFriends(String username, String... users) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Friends you want to delete tousers - username to be deletecn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper updateFriendsNote(String username, FriendNote[] array) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessaryarray - FriendNote arraycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic UserInfoResult[] getFriendsInfo(String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessarycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionCopyright © 2016. All Rights Reserved.