Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

bonnzer/websmsby

Repository files navigation

Description

CI codecov

No dependencies Node.js module for websms.by service. Currently supports only two main segments of functionality:

Installation

$ yarn add websmsby

Usage and parameters

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'});

Account

SMS

Contributing

This module is totally not ideal, so each PR will be reviewed with love and appreciate :)