ts-beeway
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

ts-beeway

ts-beeway is a library sending sms by beeway.com.ua

Documentations

https://webigorkiev.github.io/ts-beeway/

Installation

yarn add ts-beeway

Usage

Send sms

import {beeway} from "ts-beeway";

const provider = beeway({
    token: "Basic auth password",
    from: "Aplpha name" // less 11 symbol latin or number
})

const {id}  = await provider.send({
    to: "<phone>",
    message: "sms text"
});

Fetch status sms

const {status} = await provider.status({
    id:"sms id"
});

Send viber

const {id}  = await provider.viber({
    to: "<phone>",
    message: "sms text"
});

Fetch status viber

const {status} = await provider.statusViber({
    id:"viber id"
});

Bulk sms send

mailing lists are open from 10:00 to 20:00

const {result}  = await provider.bulk({
    label: "label for batch",
    messages: [
        {
            to: "<phone>",
            message: "sms text"
        }
    ]
});

Fetch balance

const {balance}  = await provider.balance();

Package Sidebar

Install

npm i ts-beeway

Weekly Downloads

21

Version

0.1.0

License

MIT

Unpacked Size

306 kB

Total Files

35

Last publish

Collaborators

  • webigorkiev