oms-gate
Sends SMS via OMS-compliant gateway (Outlook 2007 / Office 2010 Mobile Service SOAP API)
Last updated 6 years ago by vladimir.shushkov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install oms-gate 
SYNC missed versions from official npm registry.

node-oms

Sends SMS via OMS-compliant gateway (Outlook 2007 / Office 2010 Mobile Service SOAP API)

Getting Started

Install the module with: npm install oms-gate

Documentation

Methods

OmsGate.init(Object options, Function callback)

Initialize OmsGate instance. Gets service's preferences and sets options. Possible options:

  • user -- account's login
  • password -- account's password
  • url -- service endpoint URL. Optional, default URL is https://sms.megafon.ru/oms/service.asmx.
  • wsdl -- service WSDL scheme. Optional.

OmsGate.getServiceInfo(Function callback)

Returns service preferences

OmsGate.getUserInfo(Function callback)

Returns user information data

OmsGate.deliverXms(String recipientNumber, String message, Function callback)

Sends SMS to recipientNumber with text contains in message.

Examples

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);
    });

});

Contributing

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.

License

Copyright (c) 2014 Vladimir Shushkov
Licensed under the MIT license.

Current Tags

  • 0.0.2                                ...           latest (6 years ago)

2 Versions

  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (6)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |