0.0.2 • Published 9 years ago
gabia-sms v0.0.2
Gabia SMS
Unofficial Gabia SMS API for Node.js.
API
Initialize library
var GabiaSms = require("gabia-sms");
var SMS = new GabiaSms(GABIA_ID, GABIA_API_KEY);Get SMS quota
GabiaSms.getSmsCount(cb)
Send SMS(es), or LMS(es)
GabiaSms.sendSms(params, cb), GabiaSms.sendLms(params, cb), GabiaSms.sendSmses(params, cb), GabiaSms.sendLmses(params, cb)
Object params should have three properties, phone, callback, message.
params.phone- Destination phone number(s). Dashes in phone number(s) doesn't matter. If callingsendSmsesorsendLmses, it can be comma seperated numbers, orArrayof phone numbers.params.callback- Sending phone number. This phone number should be registered at Gabia SMS service. Dashes in phone number(s) doesn't matter.params.message- Body of SMS or LMS.
TODO
- Better documentation
- Better error handling
- Remove XMLRPC
- Implement all api
- In pure Javascript (xml2json uses node-expat)