public class WpimAdminAction
extends java.lang.Object
| 构造器和说明 |
|---|
WpimAdminAction(WpimApiConfig config)
管理功能处理类构造函数.
|
| 限定符和类型 | 方法和说明 |
|---|---|
org.json.JSONObject |
notify(org.json.JSONObject data)
发送通知.
|
public WpimAdminAction(WpimApiConfig config)
config - 即时通接口配置public org.json.JSONObject notify(org.json.JSONObject data)
//通知广播
JSONObject data = new JSONObject();
data.put("Title", "API通知(信贸通)");//标题
data.put("Type", "text");//类型 text:html文本 ,web:内嵌网页地址
data.put("Content", "信贸通即时通讯软件,一款跨平台可定制的 P2P 即时通信系统,为电子商务网站及各行业门户网站和企事业单位提供“一站式”定制解决方案。"); //内容
data.put("Width", 220);//窗口宽度
data.put("Height", 115);//窗口高度
data.put("Position", "3");//窗口位置 0:中间,1:左上角,2:右上角,3:右下角,4:左下角
data.put("Force", true);//是否获取焦点
data.put("Tag", "");//标签,用于归类,一般为空
data.put("OnlyOnline", 1);//接收对象,是否仅仅为在线用户,1:是,0:否
data.put("AutoClose", 3);//自动关闭时间,-1:不自动关闭,大于0则按时间关闭,时间单位为秒
JSONObject receiver = new JSONObject();
receiver.put("Type", "uin");//接收者设置,uin:指定Uin; companyConfig:公司配置,如“CompanyConfig字段设置为agencyId=5”;combination:组合条件,如“CompanyConfig字段设置为agencyId=5,NotifPermission=fhtz”
receiver.put("Uins", "1025");
data.put("Receiver", receiver);
JSONObject notifyResult = wa.notify(data);
data - 通知设置