public class ReportClient extends BaseClient
_baseUrl, _gson, _httpClient| 构造器和说明 |
|---|
ReportClient(java.lang.String appKey,
java.lang.String masterSecret) |
ReportClient(java.lang.String appKey,
java.lang.String masterSecret,
cn.jiguang.common.connection.HttpProxy proxy) |
ReportClient(java.lang.String appKey,
java.lang.String masterSecret,
cn.jiguang.common.connection.HttpProxy proxy,
JMessageConfig config)
Create a JMessage Base Client
|
| 限定符和类型 | 方法和说明 |
|---|---|
GroupStatListResult |
getGroupStatistic(java.lang.String start,
int duration)
Get group statistic, time unit only supports DAY now.
|
MessageStatListResult |
getMessageStatistic(java.lang.String timeUnit,
java.lang.String start,
int duration)
Get message statistic.
|
UserStatListResult |
getUserStatistic(java.lang.String startTime,
int duration)
Get user statistic, now time unit only supports DAY
|
MessageListResult |
v2GetGroupMessageList(long groupId,
int count,
java.lang.String begin_time,
java.lang.String end_time)
Get group message list
|
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)
Get message list with cursor, the cursor will effective in 120 seconds.
|
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.
|
setHttpClientpublic ReportClient(java.lang.String appKey,
java.lang.String masterSecret)
public ReportClient(java.lang.String appKey,
java.lang.String masterSecret,
cn.jiguang.common.connection.HttpProxy proxy)
public ReportClient(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 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
cursor - First request will return cursorcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic 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 MessageListResult v2GetGroupMessageList(long groupId, int count, java.lang.String begin_time, java.lang.String end_time) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
groupId - group idcount - message list countbegin_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'MessageListResultcn.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 exceptionCopyright © 2017. All Rights Reserved.