0.1.0 • Published 8 years ago

simplefreesms v0.1.0

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

simplefreesms

A basic way to send SMS with Free API

Installation

$ npm install simplefreesms

Features

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

License

ISC