submail-sms
Wrapper for Submail SMS-sending REST APIs.
Install
$ npm install submail-sms --save
How to use
var SMS = var sms = 'your_key' 'your_secret' // call set methods separately or chain them togethersmssms sms // -> 'y6t7uO'sms // -> [ {to: '18513993882', vars: {var1: 'foo'}}, {to: '15831998328', vars: {var1: 'bar'}} ] // the promise waysms // or with a callbacksms
Sample response
The success response from Submail is an array of mixed successes and failures. An example:
[ { status: 'success', to: '18513993882', send_id: 'aba33c824223587ed47988ebfe49b07d', fee: 1, sms_credits: '33' }, { status: 'error', to: '00000000000', code: 252, msg: 'Incorrect recipient message address' } ]
Test
$ npm test