com.hn.im.easemob.api.impl.EasemobChatMessage Maven / Gradle / Ivy
package com.hn.im.easemob.api.impl;
import com.hn.im.easemob.api.ChatMessageAPI;
import com.hn.im.easemob.api.EasemobRestAPI;
import com.hn.im.easemob.comm.constant.HTTPMethod;
import com.hn.im.easemob.comm.helper.HeaderHelper;
import com.hn.im.easemob.comm.wrapper.HeaderWrapper;
import com.hn.im.easemob.comm.wrapper.QueryWrapper;
public class EasemobChatMessage extends EasemobRestAPI implements ChatMessageAPI {
private static final String ROOT_URI = "/chatmessages";
public Object exportChatMessages(Long limit, String cursor, String query) {
String url = getContext().getSeriveURL() + getResourceRootURI();
HeaderWrapper header = HeaderHelper.getDefaultHeaderWithToken();
QueryWrapper queryWrapper = QueryWrapper.newInstance().addLimit(limit).addQueryLang(query);
return getInvoker().sendRequest(HTTPMethod.METHOD_GET, url, header, null, queryWrapper);
}
@Override
public String getResourceRootURI() {
return ROOT_URI;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy