public class JMessageClient
extends java.lang.Object
| 构造器和说明 |
|---|
JMessageClient(java.lang.String appkey,
java.lang.String masterSecret)
Create a JMessage Client.
|
JMessageClient(java.lang.String appkey,
java.lang.String masterSecret,
cn.jiguang.common.connection.HttpProxy proxy)
Create a JMessage Client with a proxy.
|
JMessageClient(java.lang.String appkey,
java.lang.String masterSecret,
cn.jiguang.common.connection.HttpProxy proxy,
JMessageConfig config)
Create a JMessage Client by custom Client configuration.
|
JMessageClient(java.lang.String appkey,
java.lang.String masterSecret,
int maxRetryTimes)
Create a JMessage Client with custom maxRetryTimes.
|
JMessageClient(java.lang.String appkey,
java.lang.String masterSecret,
java.lang.String hostname)
Create a JMessage Client with a custom hostname.
|
| 限定符和类型 | 方法和说明 |
|---|---|
cn.jiguang.common.resp.ResponseWrapper |
addBlackList(java.lang.String username,
java.lang.String... users)
Add Users to black list
|
cn.jiguang.common.resp.ResponseWrapper |
addChatRoomMember(long roomId,
Members members)
Add members to chat room
|
cn.jiguang.common.resp.ResponseWrapper |
addChatRoomMember(long roomId,
java.lang.String... members)
Add members to chat room
|
cn.jiguang.common.resp.ResponseWrapper |
addCrossBlacklist(java.lang.String username,
CrossBlacklist[] blacklists)
Add blacklist whose users belong to another app to a given user.
|
cn.jiguang.common.resp.ResponseWrapper |
addCrossFriends(java.lang.String username,
CrossFriendPayload payload)
Add users from cross app.
|
cn.jiguang.common.resp.ResponseWrapper |
addFriends(java.lang.String username,
java.lang.String... users)
Add friends to username
|
cn.jiguang.common.resp.ResponseWrapper |
addOrRemoveCrossGroupMember(long gid,
CrossGroup[] groups)
Add or remove group members from a given group id.
|
void |
addOrRemoveMembers(long gid,
java.lang.String[] addList,
java.lang.String[] removeList)
Add or remove members from a group
|
cn.jiguang.common.resp.ResponseWrapper |
addSensitiveWords(java.util.Set<java.lang.String> words)
Add sensitive words
|
cn.jiguang.common.resp.ResponseWrapper |
addSensitiveWords(java.lang.String... words)
Add sensitive words
|
CreateChatRoomResult |
createChatRoom(ChatRoomPayload payload)
Create chat room
|
CreateGroupResult |
createGroup(java.lang.String owner,
java.lang.String gname,
java.lang.String desc,
java.lang.String avatar,
int flag,
java.lang.String... userlist) |
cn.jiguang.common.resp.ResponseWrapper |
deleteChatRoom(long roomId)
Delete chat room by id
|
cn.jiguang.common.resp.ResponseWrapper |
deleteCrossBlacklist(java.lang.String username,
CrossBlacklist[] blacklists)
Delete blacklist whose users belong to another app from a given user.
|
cn.jiguang.common.resp.ResponseWrapper |
deleteCrossFriends(java.lang.String username,
CrossFriendPayload payload)
Delete cross app friends
|
cn.jiguang.common.resp.ResponseWrapper |
deleteFriends(java.lang.String username,
java.lang.String... users)
Delete friends
|
void |
deleteGroup(long gid) |
cn.jiguang.common.resp.ResponseWrapper |
deleteSensitiveWord(java.lang.String word)
Delete sensitive word
|
void |
deleteUser(java.lang.String username) |
DownloadResult |
downloadFile(java.lang.String mediaId)
Download file with mediaId, will return DownloadResult which include url.
|
cn.jiguang.common.resp.ResponseWrapper |
forbidUser(java.lang.String username,
boolean disable)
Forbid or activate user
|
UserListResult |
getAdminListByAppkey(int start,
int count)
Get admins by appkey
|
ChatRoomListResult |
getAppChatRoomInfo(int start,
int count)
Get application's chat room list
|
ChatRoomListResult |
getBatchChatRoomInfo(long... roomIds)
Get chat room information by room ids
|
UserInfoResult[] |
getBlackList(java.lang.String username)
Get a user's all black list
|
ChatRoomMemberList |
getChatRoomMembers(long roomId,
int start,
int count)
Get all member info of chat room
|
UserInfoResult[] |
getCrossBlacklist(java.lang.String username)
Get all users' info(contains appkey) of user's cross app blacklist
|
MemberListResult |
getCrossGroupMembers(long gid)
Get members' info from cross group
|
UserInfoResult[] |
getFriendsInfo(java.lang.String username)
Get all friends'info from a gived username
|
GroupInfoResult |
getGroupInfo(long gid) |
GroupListResult |
getGroupListByAppkey(int start,
int count) |
UserGroupsResult |
getGroupListByUser(java.lang.String username)
Get all groups of a user
|
MemberListResult |
getGroupMembers(long gid) |
GroupStatListResult |
getGroupStatistic(java.lang.String start,
int duration)
Get group statistic, time unit only supports DAY now.
|
MessageListResult |
getMessageList(int count,
java.lang.String begin_time,
java.lang.String end_time)
Get message list from history, messages will store 60 days.
|
MessageListResult |
getMessageListByCursor(java.lang.String cursor) |
MessageStatListResult |
getMessageStatistic(java.lang.String timeUnit,
java.lang.String start,
int duration)
Get message statistic.
|
SensitiveWordListResult |
getSensitiveWordList(int start,
int count)
Get sensitive word list
|
SensitiveWordStatusResult |
getSensitiveWordStatus()
Get sensitive word status
|
ChatRoomListResult |
getUserChatRoomInfo(java.lang.String username)
Get user's whole chat room information
|
UserInfoResult |
getUserInfo(java.lang.String username) |
UserListResult |
getUserList(int start,
int count)
Get user list
|
MessageListResult |
getUserMessages(java.lang.String username,
int count,
java.lang.String begin_time,
java.lang.String end_time)
Get message list from user's record, messages will store 60 days.
|
MessageListResult |
getUserMessagesByCursor(java.lang.String username,
java.lang.String cursor)
Get user's message list with cursor, the cursor will effective in 120 seconds.
|
UserStateListResult[] |
getUsersState(java.lang.String... users)
Get users' state
|
UserStateResult |
getUserState(java.lang.String username) |
UserStatListResult |
getUserStatistic(java.lang.String startTime,
int duration)
Get user statistic, now time unit only supports DAY
|
java.lang.String |
registerAdmins(java.lang.String username,
java.lang.String password) |
java.lang.String |
registerUsers(RegisterInfo[] users) |
cn.jiguang.common.resp.ResponseWrapper |
removeBlacklist(java.lang.String username,
java.lang.String... users) |
cn.jiguang.common.resp.ResponseWrapper |
removeChatRoomMembers(long roomId,
Members members)
remove members from chat room
|
cn.jiguang.common.resp.ResponseWrapper |
removeChatRoomMembers(long roomId,
java.lang.String... members)
remove members from chat room
|
cn.jiguang.common.resp.ResponseWrapper |
retractMessage(java.lang.String username,
long msgId)
retract message
消息撤回
|
SendMessageResult |
sendGroupTextByAdmin(java.lang.String targetId,
java.lang.String fromId,
MessageBody body)
Send group text message by admin
|
SendMessageResult |
sendMessage(java.lang.Integer version,
java.lang.String targetType,
java.lang.String targetId,
java.lang.String fromType,
java.lang.String fromId,
MessageType messageType,
MessageBody messageBody)
Send message
|
SendMessageResult |
sendMessage(MessagePayload payload) |
SendMessageResult |
sendSingleTextByAdmin(java.lang.String targetId,
java.lang.String fromId,
MessageBody body)
Send single text message by admin
|
cn.jiguang.common.resp.ResponseWrapper |
setCrossNoDisturb(java.lang.String username,
CrossNoDisturb[] array)
Set cross app no disturb
https://docs.jiguang.cn/jmessage/server/rest_api_im/#api_1
|
cn.jiguang.common.resp.ResponseWrapper |
setGroupShield(GroupShieldPayload payload,
java.lang.String username)
Set user's group message blocking
|
void |
setHttpClient(cn.jiguang.common.connection.IHttpClient httpClient) |
cn.jiguang.common.resp.ResponseWrapper |
setNoDisturb(java.lang.String username,
NoDisturbPayload payload)
Set don't disturb service while receiving messages.
|
cn.jiguang.common.resp.ResponseWrapper |
updateChatRoomInfo(long roomId,
java.lang.String ownerUsername,
java.lang.String name,
java.lang.String desc)
Update chat room info
|
cn.jiguang.common.resp.ResponseWrapper |
updateFriendsNote(java.lang.String username,
FriendNote[] array)
Update friends' note information.
|
void |
updateGroupInfo(long gid,
java.lang.String groupName,
java.lang.String groupDesc,
java.lang.String avatar) |
cn.jiguang.common.resp.ResponseWrapper |
updateSensitiveWord(java.lang.String newWord,
java.lang.String oldWord)
Update sensitive word
|
cn.jiguang.common.resp.ResponseWrapper |
updateSensitiveWordStatus(int status)
Update sensitive word status
|
void |
updateUserInfo(java.lang.String username,
java.lang.String nickname,
java.lang.String birthday,
java.lang.String signature,
int gender,
java.lang.String region,
java.lang.String address,
java.lang.String avatar) |
void |
updateUserInfo(java.lang.String username,
UserPayload payload) |
void |
updateUserPassword(java.lang.String username,
java.lang.String password) |
cn.jiguang.common.resp.ResponseWrapper |
updateUserSpeakStatus(long roomId,
java.lang.String username,
int flag)
Update user speak status
|
UploadResult |
uploadFile(java.lang.String path)
Upload file, only support image file(jpg, bmp, gif, png) currently,
file size should not larger than 8M.
|
MessageListResult |
v2GetMessageList(int count,
java.lang.String begin_time,
java.lang.String end_time)
Get message list from history, messages will store 60 days.
|
MessageListResult |
v2GetMessageListByCursor(java.lang.String cursor) |
MessageListResult |
v2GetUserMessages(java.lang.String username,
int count,
java.lang.String begin_time,
java.lang.String end_time)
Get message list from user's record, messages will store 60 days.
|
MessageListResult |
v2GetUserMessagesByCursor(java.lang.String username,
java.lang.String cursor)
Get user's message list with cursor, the cursor will effective in 120 seconds.
|
public JMessageClient(java.lang.String appkey,
java.lang.String masterSecret)
appkey - The KEY of one application on JPush.masterSecret - API access secret of the appKey.public JMessageClient(java.lang.String appkey,
java.lang.String masterSecret,
int maxRetryTimes)
appkey - The KEY of one application on JPush.masterSecret - API access secret of the appKey.maxRetryTimes - The max retry times.public JMessageClient(java.lang.String appkey,
java.lang.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 JMessageClient(java.lang.String appkey,
java.lang.String masterSecret,
java.lang.String hostname)
appkey - The KEY of one application on JPush.masterSecret - API access secret of the appKey.hostname - The custom hostname.public JMessageClient(java.lang.String appkey,
java.lang.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 java.lang.String registerUsers(RegisterInfo[] users) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic java.lang.String registerAdmins(java.lang.String username,
java.lang.String password)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic UserInfoResult getUserInfo(java.lang.String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic UserStateResult getUserState(java.lang.String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic UserStateListResult[] getUsersState(java.lang.String... users) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
users - username of usersUserStateListResultcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic void updateUserPassword(java.lang.String username,
java.lang.String password)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic void updateUserInfo(java.lang.String username,
java.lang.String nickname,
java.lang.String birthday,
java.lang.String signature,
int gender,
java.lang.String region,
java.lang.String address,
java.lang.String avatar)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic void updateUserInfo(java.lang.String username,
UserPayload payload)
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 UserInfoResult[] getBlackList(java.lang.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(java.lang.String username,
java.lang.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(java.lang.String username,
java.lang.String... users)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic UserGroupsResult getGroupListByUser(java.lang.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 void deleteUser(java.lang.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 setNoDisturb(java.lang.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 cn.jiguang.common.resp.ResponseWrapper addFriends(java.lang.String username,
java.lang.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(java.lang.String username,
java.lang.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(java.lang.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(java.lang.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 setGroupShield(GroupShieldPayload payload, java.lang.String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
payload - GroupShieldPayloadusername - Necessarycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper forbidUser(java.lang.String username,
boolean disable)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
username - usernamedisable - true means forbid, false means activatecn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic GroupInfoResult getGroupInfo(long gid) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic MemberListResult getGroupMembers(long gid) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic GroupListResult getGroupListByAppkey(int start, int count) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic CreateGroupResult createGroup(java.lang.String owner, java.lang.String gname, java.lang.String desc, java.lang.String avatar, int flag, java.lang.String... userlist) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic void addOrRemoveMembers(long gid,
java.lang.String[] addList,
java.lang.String[] removeList)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
gid - The group idaddList - If this parameter is null then send remove requestremoveList - If this parameter is null then send add requestcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic void deleteGroup(long gid)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic void updateGroupInfo(long gid,
java.lang.String groupName,
java.lang.String groupDesc,
java.lang.String avatar)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic SendMessageResult sendMessage(java.lang.Integer version, java.lang.String targetType, java.lang.String targetId, java.lang.String fromType, java.lang.String fromId, MessageType messageType, MessageBody messageBody) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
version - Current version is 1targetType - Group or singletargetId - The message receiverfromType - Only support admin nowfromId - SendermessageType - MessageType: text, image or custommessageBody - A MessageBodyResult instancecn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic SendMessageResult sendMessage(MessagePayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic SendMessageResult sendSingleTextByAdmin(java.lang.String targetId, java.lang.String fromId, MessageBody body) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
targetId - target user's idfromId - sender's idbody - message body, include text and extra(if needed).cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic SendMessageResult sendGroupTextByAdmin(java.lang.String targetId, java.lang.String fromId, MessageBody body) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
targetId - target user's idfromId - sender's idbody - message body, include text and extra(if needed).cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic MessageListResult getMessageList(int count, java.lang.String begin_time, java.lang.String end_time) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
count - Necessary parameter. The count of the message list.begin_time - Necessary parameter. The format must follow by 'yyyy-MM-dd HH:mm:ss'end_time - Necessary parameter. The format must follow by 'yyyy-MM-dd HH:mm:ss'cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic MessageListResult getMessageListByCursor(java.lang.String cursor) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic MessageListResult getUserMessages(java.lang.String username, int count, java.lang.String begin_time, java.lang.String end_time) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessary parameter.count - Necessary parameter. The count of the message list.begin_time - Optional parameter. The format must follow by 'yyyy-MM-dd HH:mm:ss'end_time - Optional parameter. The format must follow by 'yyyy-MM-dd HH:mm:ss'cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic MessageListResult getUserMessagesByCursor(java.lang.String username, java.lang.String cursor) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessary parameter.cursor - First request will return cursorcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper retractMessage(java.lang.String username,
long msgId)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
username - 用户名msgId - message idcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic DownloadResult downloadFile(java.lang.String mediaId) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
mediaId - Necessarycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic UploadResult uploadFile(java.lang.String path) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
path - Necessary, the native path of the file you want to uploadcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper addOrRemoveCrossGroupMember(long gid,
CrossGroup[] groups)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
gid - Necessary, target group id.groups - Necessarycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic MemberListResult getCrossGroupMembers(long gid) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
gid - Necessary, target group idcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper addCrossBlacklist(java.lang.String username,
CrossBlacklist[] blacklists)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
username - The owner of the blacklistblacklists - CrossBlacklist arraycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper deleteCrossBlacklist(java.lang.String username,
CrossBlacklist[] blacklists)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
username - The owner of the blacklistblacklists - CrossBlacklist arraycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic UserInfoResult[] getCrossBlacklist(java.lang.String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessary, the owner of blacklistcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper setCrossNoDisturb(java.lang.String username,
CrossNoDisturb[] array)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
username - Necessaryarray - CrossNoDisturb arraycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper addCrossFriends(java.lang.String username,
CrossFriendPayload payload)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
username - Necessarypayload - CrossFriendPayloadcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper deleteCrossFriends(java.lang.String username,
CrossFriendPayload payload)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
username - Necessarypayload - CrossFriendPayloadcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper addSensitiveWords(java.lang.String... words)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
words - String arraycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper addSensitiveWords(java.util.Set<java.lang.String> words)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
words - String Setcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper updateSensitiveWord(java.lang.String newWord,
java.lang.String oldWord)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
newWord - new wordoldWord - old wordcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper deleteSensitiveWord(java.lang.String word)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
word - word to be deletedcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic SensitiveWordListResult getSensitiveWordList(int start, int count) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
start - the begin of the listcount - the count of the listcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper updateSensitiveWordStatus(int status)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
status - 1 represent turn on filtering, 0 represent turn off.cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic SensitiveWordStatusResult getSensitiveWordStatus() throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic CreateChatRoomResult createChatRoom(ChatRoomPayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
payload - ChatRoomPayloadcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ChatRoomListResult getBatchChatRoomInfo(long... roomIds) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
roomIds - Array of room idChatRoomListResultcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ChatRoomListResult getUserChatRoomInfo(java.lang.String username) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - requiredChatRoomListResultcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ChatRoomListResult getAppChatRoomInfo(int start, int count) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
start - start indexcount - list countChatRoomListResultcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper updateChatRoomInfo(long roomId,
java.lang.String ownerUsername,
java.lang.String name,
java.lang.String desc)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
roomId - room idownerUsername - owner usernamename - new chat room namedesc - chat room descriptioncn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper deleteChatRoom(long roomId)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
roomId - room idcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper updateUserSpeakStatus(long roomId,
java.lang.String username,
int flag)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
roomId - chat room idusername - user to be modifiedflag - 0 means allow to speak, 1 means forbid to speak in chat roomcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ChatRoomMemberList getChatRoomMembers(long roomId, int start, int count) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
roomId - chat room idstart - start indexcount - member countChatRoomMemberListcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper addChatRoomMember(long roomId,
java.lang.String... members)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
roomId - chat room idmembers - username arraycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper addChatRoomMember(long roomId,
Members members)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
roomId - chat room idmembers - Memberscn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper removeChatRoomMembers(long roomId,
java.lang.String... members)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
roomId - chat room idmembers - username arraycn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper removeChatRoomMembers(long roomId,
Members members)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
roomId - chat room idmembers - Memberscn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic MessageListResult v2GetMessageList(int count, java.lang.String begin_time, java.lang.String end_time) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
count - Necessary parameter. The count of the message list.begin_time - Necessary parameter. The format must follow by 'yyyy-MM-dd HH:mm:ss'end_time - Necessary parameter. The format must follow by 'yyyy-MM-dd HH:mm:ss'cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic MessageListResult v2GetMessageListByCursor(java.lang.String cursor) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic MessageListResult v2GetUserMessages(java.lang.String username, int count, java.lang.String begin_time, java.lang.String end_time) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessary parameter.count - Necessary parameter. The count of the message list.begin_time - Optional parameter. The format must follow by 'yyyy-MM-dd HH:mm:ss'end_time - Optional parameter. The format must follow by 'yyyy-MM-dd HH:mm:ss'cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic MessageListResult v2GetUserMessagesByCursor(java.lang.String username, java.lang.String cursor) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
username - Necessary parameter.cursor - First request will return cursorcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic UserStatListResult getUserStatistic(java.lang.String startTime, int duration) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
startTime - start time, format: yyyy-MM-ddduration - 0-60UserStatListResultcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic MessageStatListResult getMessageStatistic(java.lang.String timeUnit, java.lang.String start, int duration) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
timeUnit - MUST be one of HOUR, DAY, MONTHstart - start time, when timeUnit is HOUR, format: yyyy-MM-dd HH,duration - depends on timeUnit, the duration has limitMessageStatListResultcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic GroupStatListResult getGroupStatistic(java.lang.String start, int duration) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
start - Format: yyyy-MM-ddduration - duration must between 0 and 60GroupStatListResultcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic void setHttpClient(cn.jiguang.common.connection.IHttpClient httpClient)
Copyright © 2018. All Rights Reserved.