No dependencies Node.js module for websms.by service. Currently supports only two main segments of functionality:
- work with account's data
- sending SMS functions
$ yarn add websmsby
This module has a bunch of *.d.ts
files so you can use this lib with pleasure and Typescript :)
Every request returns Promise, so it shouldn't be a problem to use methods in classic way or with async/await.
Just a simple example with Account, cause all needed docs you can find below:
import { Account } from 'websmsby';
// user and apiKey params are mandatory, testMode and devKey aren't.
const account = new Account({ user: 'yourmail@here.com', apiKey: 'somekey' });
account.getBalance().then().catch((e)..
...or with SMS
import { SMS } from 'websmsby';
const gateway = new SMS({ user: 'yourmail@here.com', apiKey: 'somekey', testMode: true });
gateway.sendSMS({ recipients: ['375291111111'], message: 'hello, world!', sender: 'myname'});
This module is totally not ideal, so each PR will be reviewed with love and appreciate :)