1.0.0 • Published 8 years ago

dxw v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

DXW 使用示例

引入并初始化

var XM = require('dxw').XM;
var xm = new XM('name','token');

发送消息给指定人员

xm.send({
    receivers: ['somebody@meituan.com'],
    body: 'something you wanna send',
    sender: 'sender@meituan.com'
});

调用指定的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');
1.0.0

8 years ago