simplefreesms
v0.1.0
Published
A basic way to send SMS with Free API
Downloads
6
Readme
simplefreesms
A basic way to send SMS with Free API
Installation
$ npm install simplefreesms
Features
- just send free sms with your Free account (https://mobile.free.fr/moncompte/)
Doc
- static sendStatic(string login, string secretKey, string message) // return Promise
- login(string login) // return this
- key(string secretKey) // return this
- send(string message) // return Promise
Examples
// sync
const SMS = require('simplefreesms');
// send message without object instanciation
SMS.sendStatic('XXXXXXXX', 'XXXXXXXXXXXXXX', 'message').then(function() {
console.log('sended');
}).catch(function(err) {
console.log(err);
});
// send message with object instanciation
let mySMS = new SMS();
// register login & secret key for this instance
mySMS.login('XXXXXXXX').key('XXXXXXXXXXXXXX');
// send message with registered login & secret key
mySMS.send('message').then(function() {
console.log('sended');
}).catch(function(err) {
console.log(err);
});
Tests
$ node tests/tests.js