1.0.6 • Published 2 years ago
ts-smsc v1.0.6
Documentations
https://webigorkiev.github.io/ts-smsc/
Installation
npm i ts-smsc
Usage
import {smsc} from "ts-smsc";
const sender = smsc({
// smsc.ConfigureOptions
login: SMSC_LOGIN,
password: SMSC_PASSWORD
});
// Send sms
sender.send({
phones: "+38093100xxxx",
mes: "Test text"
});
// Or send call code
sender.send({
phones: "+38093100xxxx",
mes: "Test text",
call: 1
});
Async Usage
import {smsc} from "ts-smsc";
const sender = smsc({
// smsc.ConfigureOptions
login: SMSC_LOGIN,
password: SMSC_PASSWORD
});
(async() => {
// Send call code
const {data, err, code} = await sender.send({
phones: "+38093100xxxx",
mes: "code",
call: 1
});
})();