Package Exports
- coolsms-rest-sdk
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (coolsms-rest-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
coolsms-rest-sdk
coolsms rest-sdk for node.js Documentation
Installation
npm install coolsms-rest-sdk
Test
npm test
Usage
var Coolsms = require('coolsms-rest-sdk');
var client = new Coolsms({
key: 'your API key',
secret: 'your API secret key'
});
client.sms.send({
to: '00000000000', // recipient
from: '11111111111', // sender
type: 'SMS', // SMS, LMS, MMS
text: 'your message',
}, function (error, result) {
if(error) {
console.log(error);
} else {
console.log(result);
}
});Available resources & methods
Where you see params it is a plain JavaScript object, e.g. { text: 'Hello world!' }
param is not need to include authentication information
- sms
sms.send( params, [callback] )sms.status( [params, callback] )sms.sent( [params, callback] )sms.balance( [callback] )sms.cancel( [params, callback] )- mo
mo.list( [params, callback] )mo.insert( params, [callback] )- senderID
senderID.register( params, [callback] )senderID.verify( params, [callback] )senderID.delete( params, [callback] )senderID.list([ params, callback] )senderID.setDefault( params, [callback] )senderID.getDefault( [params, callback] )
License
MIT