ss

semaphore-sms

Small client library to use semaphore.co API in node.js

Showing:

Popularity

Downloads/wk

1

GitHub Stars

0

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

2

Size (min+gzip)

0.4KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

semaphore-nodejs

Small client library to use semaphore.co API in node.js

##Usage

Install the npm in your project

> npm install semaphore-sms

Example usage:

var semaphore = require('semaphore-sms');

semaphore.set_api_key("...");

semaphore.send_sms("09000000000", "Test message!", "A Sender", function(response) {
  
  if (response.status === 'success') {
    //Message sent!
  }
  
})

##Sending SMS message(s)

The method semaphore.send_sms is used to an SMS to between 1 and 20 recipient phone numbers.

semaphore.send_sms(numbers, message, sender, callback)
ParameterTypeDescription
numbersString or ArrayA phone number or an array of phone numbers to be the recipients of the SMS (20 max)
messageStringThe message body, 140 chars max
senderStringThe sender name
callbackFunctionA callback function. The only param will be a JSON object returned from the semaphore API

##Tests

Add your api key to tests/test.js then run npm test

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100