public class MessageClient extends BaseClient
_baseUrl, _gson, _httpClient| Constructor and Description |
|---|
MessageClient(java.lang.String appKey,
java.lang.String masterSecret) |
MessageClient(java.lang.String appKey,
java.lang.String masterSecret,
cn.jiguang.common.connection.HttpProxy proxy,
JMessageConfig config) |
| Modifier and Type | Method and Description |
|---|---|
ChatRoomHistoryResult |
getChatRoomHistory(java.lang.Long chatroomid,
int count,
java.lang.String beginTime,
java.lang.String endTime)
get chatroom history message
|
ChatRoomHistoryResult |
getChatRoomHistory(java.lang.Long chatroomid,
java.lang.String cursor)
get chatroom history message
|
MessageListResult |
getMessageList(int count,
java.lang.String begin_time,
java.lang.String end_time)
Deprecated.
|
MessageListResult |
getMessageListByCursor(java.lang.String cursor)
Deprecated.
|
MessageListResult |
getUserMessages(java.lang.String username,
int count,
java.lang.String begin_time,
java.lang.String end_time)
Deprecated.
|
MessageListResult |
getUserMessagesByCursor(java.lang.String username,
java.lang.String cursor)
Deprecated.
|
cn.jiguang.common.resp.ResponseWrapper |
retractMessage(java.lang.String username,
long messageId)
retract message
消息撤回
|
SendMessageResult |
sendMessage(MessagePayload payload) |
setHttpClientpublic MessageClient(java.lang.String appKey,
java.lang.String masterSecret)
public MessageClient(java.lang.String appKey,
java.lang.String masterSecret,
cn.jiguang.common.connection.HttpProxy proxy,
JMessageConfig config)
public SendMessageResult sendMessage(MessagePayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestException@Deprecated public 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
ReportClient.v2GetMessageList(int, String, String)
Get message list from history, messages will store 60 days.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 exception@Deprecated public MessageListResult getMessageListByCursor(java.lang.String cursor) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
ReportClient.v2GetUserMessagesByCursor(String, String)
Get message list with cursor, the cursor will effective in 120 seconds. And will
return same count of messages as first request.cursor - First request will return cursorcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exception@Deprecated public 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
ReportClient.v2GetUserMessages(String, int, String, String)
Get message list from user's record, messages will store 60 days.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 exception@Deprecated public MessageListResult getUserMessagesByCursor(java.lang.String username, java.lang.String cursor) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
ReportClient.v2GetUserMessagesByCursor(java.lang.String, java.lang.String)
Get user's message list with cursor, the cursor will effective in 120 seconds.
And will return same count of messages as first request.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 messageId)
throws cn.jiguang.common.resp.APIConnectionException,
cn.jiguang.common.resp.APIRequestException
username - 用户名messageId - message idcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ChatRoomHistoryResult getChatRoomHistory(java.lang.Long chatroomid, int count, java.lang.String beginTime, java.lang.String endTime) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
chatroomid - count - must greater than zero and less than 1000beginTime - format yyyy-MM-dd HH:mm:ssendTime - format yyyy-MM-dd HH:mm:sscn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionpublic ChatRoomHistoryResult getChatRoomHistory(java.lang.Long chatroomid, java.lang.String cursor) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
chatroomid - cursor - must greater than zero and less than 1000cn.jiguang.common.resp.APIConnectionExceptioncn.jiguang.common.resp.APIRequestExceptionCopyright © 2019. All Rights Reserved.