com.hn.im.easemob.api.IMUserAPI Maven / Gradle / Ivy
package com.hn.im.easemob.api;
/**
* This interface is created for RestAPI of User Integration, it should be
* synchronized with the API list.
*
* @author Eric23 2016-01-05
*/
public interface IMUserAPI {
/**
* 注册IM用户[单个]
* POST
*
* @param payload
* {"username":"${用户名}","password":"${密码}", "nickname":"${昵称值}"}
* @return Object
*/
Object createNewIMUserSingle(Object payload);
/**
* 注册IM用户[批量]
* POST
*
* @param payload
* [{"username":"${用户名1}","password":"${密码}"},…,{"username":"${用户名2}","password":"${密码}"}]
* @return Object
*/
Object createNewIMUserBatch(Object payload);
/**
* 获取IM用户[单个]
* GET
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object getIMUsersByUserName(String userName);
/**
* 获取IM用户[批量],参数为空时默认返回最早创建的10个用户
* GET
*
* @param limit
* 单页获取数量
* @param cursor
* 游标,大于单页记录时会产生
* @return Object
*/
Object getIMUsersBatch(Long limit, String cursor);
/**
* 删除IM用户[单个]
* DELETE
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object deleteIMUserByUserName(String userName);
/**
* 删除IM用户[批量],随机删除
* DELETE
*
* @param limit
* 删除数量,建议100-500
* @return Object
*/
Object deleteIMUserBatch(Long limit);
/**
* 重置IM用户密码
* PUT
*
* @param userName
* 用戶名或用戶ID
* @param payload
* {"newpassword" : "${新密码指定的字符串}"}
* @return Object
*/
Object modifyIMUserPasswordWithAdminToken(String userName, Object payload);
/**
* 修改用户昵称
* PUT
*
* @param userName
* 用戶名或用戶ID
* @param payload
* {"nickname" : "${昵称值}"}
* @return Object
*/
Object modifyIMUserNickNameWithAdminToken(String userName, Object payload);
/**
* 给IM用户的添加好友
* POST
*
* @param userName
* 用戶名或用戶ID
* @param friendName
* 好友用戶名或用戶ID
* @return Object
*/
Object addFriendSingle(String userName, String friendName);
/**
* 解除IM用户的好友关系
* DELETE
*
* @param userName
* 用戶名或用戶ID
* @param friendName
* 好友用戶名或用戶ID
* @return Object
*/
Object deleteFriendSingle(String userName, String friendName);
/**
* 查看某个IM用户的好聊趣息
* GET
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object getFriends(String userName);
/**
* 获取IM用户的黑名单
* GET
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object getBlackList(String userName);
/**
* 往IM用户的黑名单中加人
* POST
*
* @param userName
* 用戶名或用戶ID
* @param payload
* {"usernames":["5cxhactgdj", "mh2kbjyop1"]}
* @return Object
*/
Object addToBlackList(String userName, Object payload);
/**
* 从IM用户的黑名单中减人
* DELETE
*
* @param userName
* 用戶名或用戶ID
* @param blackListName
* 黑名单用戶名或用戶ID
* @return Object
*/
Object removeFromBlackList(String userName, String blackListName);
/**
* 查看用户在线状态
* GET
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object getIMUserStatus(String userName);
/**
* 查询离线消息数
* GET
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object getOfflineMsgCount(String userName);
/**
* 查询某条离线消息状态
* GET
*
* @param userName
* 用戶名或用戶ID
* @param msgId
* 消息ID
* @return Object
*/
Object getSpecifiedOfflineMsgStatus(String userName, String msgId);
/**
* 用户账号禁用
* POST
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object deactivateIMUser(String userName);
/**
* 用户账号解禁
* POST
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object activateIMUser(String userName);
/**
* 强制用户下线
* GET
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object disconnectIMUser(String userName);
/**
* 获取用户参与的群组
* GET
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object getIMUserAllChatGroups(String userName);
/**
* 获取用户所有参与的聊天室
* GET
*
* @param userName
* 用戶名或用戶ID
* @return Object
*/
Object getIMUserAllChatRooms(String userName);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy