public class UserClient extends BaseClient
_baseUrl, _httpClient| 构造器和说明 |
|---|
UserClient(String appkey,
String masterSecret)
Create a User Client with default parameters.
|
UserClient(String appkey,
String masterSecret,
cn.jpush.api.common.connection.HttpProxy proxy)
Create a User Client with a proxy.
|
UserClient(String appkey,
String masterSecret,
cn.jpush.api.common.connection.HttpProxy proxy,
JMessageConfig config)
Create a User Client with custom config.
|
| 限定符和类型 | 方法和说明 |
|---|---|
cn.jpush.api.common.resp.ResponseWrapper |
addBlackList(String username,
String... users)
Add Users to black list
|
cn.jpush.api.common.resp.ResponseWrapper |
deleteUser(String username) |
UserListResult |
getAdminListByAppkey(int start,
int count)
Get admins by appkey
|
cn.jpush.api.common.resp.ResponseWrapper |
getBlackList(String username)
Get a user's all black list
|
UserGroupsResult |
getGroupList(String username)
Get all groups of a user
|
UserInfoResult |
getUserInfo(String username) |
UserListResult |
getUserList(int start,
int count)
Get user list
|
cn.jpush.api.common.resp.ResponseWrapper |
registerAdmins(RegisterInfo payload) |
cn.jpush.api.common.resp.ResponseWrapper |
registerUsers(RegisterPayload payload) |
cn.jpush.api.common.resp.ResponseWrapper |
removeBlackList(String username,
String... users) |
cn.jpush.api.common.resp.ResponseWrapper |
updatePassword(String username,
String password) |
cn.jpush.api.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.jpush.api.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.jpush.api.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.jpush.api.common.resp.ResponseWrapper registerUsers(RegisterPayload payload) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic cn.jpush.api.common.resp.ResponseWrapper registerAdmins(RegisterInfo payload) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic UserInfoResult getUserInfo(String username) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic cn.jpush.api.common.resp.ResponseWrapper updatePassword(String username, String password) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic cn.jpush.api.common.resp.ResponseWrapper updateUserInfo(String username, UserPayload payload) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic UserListResult getUserList(int start, int count) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
start - The start index of the listcount - The number that how many you want to get from listcn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic UserListResult getAdminListByAppkey(int start, int count) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
start - The start index of the listcount - The number that how many you want to get from listcn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic UserGroupsResult getGroupList(String username) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
username - cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic cn.jpush.api.common.resp.ResponseWrapper deleteUser(String username) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic cn.jpush.api.common.resp.ResponseWrapper addBlackList(String username, String... users) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
username - The owner of the black listusers - The users that will add to black listcn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic cn.jpush.api.common.resp.ResponseWrapper removeBlackList(String username, String... users) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
cn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionpublic cn.jpush.api.common.resp.ResponseWrapper getBlackList(String username) throws cn.jpush.api.common.resp.APIConnectionException, cn.jpush.api.common.resp.APIRequestException
username - The owner of the black listcn.jpush.api.common.resp.APIConnectionExceptioncn.jpush.api.common.resp.APIRequestExceptionCopyright © 2016. All Rights Reserved.