node-ytx

0.3.0 • Public • Published

NPM version Build Status Dependency Status

云通讯node实现

Install

$ npm install --save node-ytx

Usage

 
var ytx = require('node-ytx');
var config = {
url: 'sandboxapp.cloopen.com',
     port: 8883,
     version: '2013-12-26',
     appId: 'yourAppId',
     accountSid: 'yourAccountSid',
     accountToken: 'YourAccountToken'
};
ytx.init(config);
 
//Specify a phone number which your can test
var phone = '13800000000';
 
ytx.smsTemplate(phone, [' 云通讯测试', "" + Math.round(Math.random() * 1000000) ], 1, function (error, data) {
  var json;
  try {
    json = JSON.parse(String(data));
  } catch(e) {
    console.log(e);
  }
});
 

License

MIT © calidion

Package Sidebar

Install

npm i node-ytx

Weekly Downloads

2

Version

0.3.0

License

MIT

Last publish

Collaborators

  • calidion