simplefreesms

0.1.0 • Public • Published

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

License

ISC

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i simplefreesms

      Weekly Downloads

      1

      Version

      0.1.0

      License

      ISC

      Last publish

      Collaborators

      • psychopoulet