0.0.1 • Published 3 years ago

nikita-sms v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Nikita Sms

npm npm

Installation

Installation is done using the npm install command:

npm install nikita-sms
# or
yarn add nikita-sms

Usage

const NikitaSms = require('nikita-sms');

// Creates a new user with username and password
const user = new NikitaSms('username', 'password');

const recipient = '+37477918700'; //recipient number
const text = 'sms body text'; // sms text
const id = recipient.substring(1) + +new Date(); //sms id (number + timestamp)
const priority = '8'; //sms priority (optional) defalut: 8

user.sendSms(recipient, text, id).then((data) => {
  console.log(data); // ⇨ 'OK'
});

user.getStatusSms(id).then((data) => {
  console.log(data); // ⇨ {
  //   messages: [
  //     {
  //       'message-id': '374779187001605872849862',
  //       channel: 'SMS',
  //       status: 'Delivered',
  //       'status-date': '2020-11-20 15:47:33',
  //       description: ' '
  //     }
  //   ]
  // }
});

sms text

License

MIT