public class MessageClient extends BaseClient
_baseUrl, _gson, _httpClient| 构造器和说明 |
|---|
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) |
| 限定符和类型 | 方法和说明 |
|---|---|
MessageListResult |
getMessageList(int count,
java.lang.String begin_time,
java.lang.String end_time)
已过时。
|
MessageListResult |
getMessageListByCursor(java.lang.String cursor)
已过时。
|
MessageListResult |
getUserMessages(java.lang.String username,
int count,
java.lang.String begin_time,
java.lang.String end_time)
已过时。
|
MessageListResult |
getUserMessagesByCursor(java.lang.String username,
java.lang.String cursor)
已过时。
|
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 exceptionCopyright © 2017. All Rights Reserved.