1.0.2 • Published 8 years ago

sms-by-luosima v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

sms-by-luosima

Send SMS by LuoSiMao service

LuoSiMao is a web service to provide API gateway send SMS including text and voice format to mobile phone in China.

This program just packaged its API and make them more convenient way to use.

Preparation

Install with:

npm install sms-by-luosima

Alternative way with:

git clone https://github.com/baohanddd/sms-by-luosima.git ./sms

Usage

var redis = require("redis")
    , subscriber = redis.createClient()
    , service = require('./luosimao.js');

service.sign = "orginazation-name";
service.key  = "your-api-key";

subscriber.on("message", function(channel, message) {
    var data = JSON.parse(message);
    console.log('send "'+data.message+'" to ' + data.mobile);
    service.send(data);
});

subscriber.subscribe("sms");
console.log('Start to listen `sms` queue...');

License

MIT

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago