kesho-broadcast
v1.0.2
Published
Broadcast is a Node.js package designed to facilitate sending messages via a specified API. It handles various messaging functionalities including SMS and email.
Downloads
225
Readme
Broadcast
Broadcast is a Node.js package designed to facilitate sending messages via a specified API. It handles various messaging functionalities including SMS and email.
Installation
To install the Broadcast package, run the following command in your project directory:
npm install kesho-broadcast
Usage
To use the Broadcast package, you need to initialize it with your API key. Here's an example of how to do that:
const Broadcast = require('kesho-broadcast');
const apiKey = 'your-api-key';
const broadcast = new Broadcast(apiKey);
Sending a message
To send a message, you can use the sendMessage
method. Here's an example of how to do that:
const response = await broadcast.sendMessage({
template: '',
labels: '',
phoneNumbers: '254700000',
message: 'Hi there mr kelvin',
type: 'sms',
subject: 'Hi there mr kelvin',
provider: ''
});