1.1.1 • Published 6 years ago

node-rocketsms-api v1.1.1

Weekly downloads
8
License
BSD-3-Clause
Repository
github
Last release
6 years ago

node-rocketsms-api

RocketSMS sms-gateway API.

build status

Installation

This module is installed via npm:

$ npm install node-rocketsms-api

Example Usage

var RocketSMS = require('node-rocketsms-api');

var sms = new RocketSMS({username: '999999999', password: 'XXXXXXXX'});

Create message

sms.send('375999999999', 'Привет, мир!', true)
  .then(function(res) {
    ...
  })
  .catch(function(err) {
    ...
  };

Message status

sms.status(34305153)
  .then(function(res) {
    ...
  })
  .catch(function(err) {
    ...
  })

Account balance

sms.balance()
  .then(function(res) {
    ...
  })
  .catch(function(err) {
    ...
  })

Alfa-numbers list

sms.senders()
  .then(function(res) {
    ...
  })
  .catch(function(err) {
    ...
  })

Add alfa-number

sms.addSender('99999999999')
  .then(function(res) {
    ...
  })
  .catch(function(err) {
    ...
  })

Templates list

sms.templates()
  .then(function(res) {
    ...
  })
  .catch(function(err) {
    ...
  })

License

3-clause BSD © Egor Kuryanovich