@thermopylae/lib.sms
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@thermopylae/lib.sms

Version Node Version Documentation License: MIT

Sms client.

Install

npm install @thermopylae/lib.sms

Description

This package contains SmsClient which can send sms.
In order to accomplish this task, it uses internally twilio npm package.

Usage

Example:

import { SmsClient } from '@thermopylae/lib.sms';

(async function main() {
    const smsClient = new SmsClient({
        "accountSid": "ACCOUNT-SID-FROM-TWILIO-CONSOLE",
        "authToken": "AUTH-TOKEN-FROM-TWILIO-CONSOLE",
        "fromNumber": "NUMBER-FROM-TWILIO-CONSOLE"
    });

    const deliveryStatus = await smsClient.send('+40781659032', 'Sms Text');
    console.log('Delivery status is ', deliveryStatus);
})();

API Reference

API documentation is available here.

It can also be generated by issuing the following commands:

git clone git@github.com:marinrusu1997/thermopylae.git
cd thermopylae
yarn install
yarn workspace @thermopylae/lib.sms run doc

Author

👤 Rusu Marin

📝 License

Copyright © 2021 Rusu Marin.
This project is MIT licensed.

Package Sidebar

Install

npm i @thermopylae/lib.sms

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

6.03 kB

Total Files

8

Last publish

Collaborators

  • marinrusu1997