dxw
v1.0.0
Published
### 引入并初始化
Downloads
4
Readme
DXW 使用示例
引入并初始化
var XM = require('dxw').XM;
var xm = new XM('name','token');
发送消息给指定人员
xm.send({
receivers: ['[email protected]'],
body: 'something you wanna send',
sender: '[email protected]'
});
调用指定的XM API接口
// 接口参数:messageInfo, callback, host, method, path, appKey, appToken
xm.request({
queryName: 'queryValue'
}, function(body) {
// do something here
}, 'party.xm.sankuai.com', 'GET', '/api/v1/name', 'app-key', 'app-token');