Sends SMS via OMS-compliant gateway (Outlook 2007 / Office 2010 Mobile Service SOAP API)
Install the module with: npm install oms-gate
Initialize OmsGate instance. Gets service's preferences and sets options. Possible options:
user
-- account's loginpassword
-- account's passwordurl
-- service endpoint URL. Optional, default URL ishttps://sms.megafon.ru/oms/service.asmx
.wsdl
-- service WSDL scheme. Optional.
Returns service preferences
Returns user information data
Sends SMS to recipientNumber
with text contains in message
.
var omsGate = require('oms-gate');
omsGate.init({
user: 'user',
password: 'password'
}, function(err, gate) {
if (err) {
console.error(err);
}
gate.getServiceInfo(function(err, data) {
if (err) {
console.error(err);
return;
}
console.log(data);
});
gate.getUserInfo(function(err, data) {
if (err) {
console.error(err);
return;
}
console.log(data);
});
gate.deliverXms('75555555555', 'Hello, World!', function(err, data) {
if (err) {
console.error(err);
return;
}
console.log(data);
});
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Copyright (c) 2014 Vladimir Shushkov
Licensed under the MIT license.