1.0.3 • Published 5 years ago

kirusa-sms v1.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

kirusa-sms

This is a nodejs module to fast track the use of the kirusa api library.

Installation

npm install kirusa-sms

Usage

const Kirusa = require('kirusa-sms')

var kirusa = new Kirusa(
    kirusa_api_key,
    kirusa_account_id,
    kirusa_sender_number,
    country_phone_code,
    mask
)

Every instance of Kirusa can support only one country code.

Properties

ParamterDescriptionRequiredDefault
kirusa_api_keythe api key from your kirusa accounttrue-
kirusa_account_idyour account idtrue-
kirusa_sender_numberyour kirusa registered sender phone number (short or long number)true-
country_phone_codecountry code of the valid phone numbers you wish to send totrue+234
maskyour account sender maskfalse-

Format your phone numbers

var formatted_numbers = kirusa.format_numbers(['+2348144821911', '+2219035400223']);

formatted_numbers = {
    valid: ['+2348144821911'],
    invalid: ['+2219035400223']
}

send sms to many or to one phone number

var response = await kirusa.send_single(message, '+2348144821911');

OR

var response = await kirusa.send_multiple(message, formatted_numbers.valid);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT