1.1.2 • Published 7 years ago

mengwangsms v1.1.2

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

mengwang

Node.js SDK for mengwang sms SOAP.

Build Status semantic-release

Examples

import Mengwang from 'mengwang';

const mengwang = new Mengwang({
  username: '<Your userId>',
  userpass: '<Your password>'
});

mengwang.sendSms('13700000000', '我是内容').then((result) => {
  console.log(result);
}, (err) => {
  console.error(err);
});

Installation

$ npm install mengwang

Documents

Table of Contents

Class: Mengwang

This class is a wrapper for mengwang sms SOAP API

new Mengwang(options)

Construct a new mengwang object

options is an object with the following defaults:

{
  wsdl: 'http://61.145.229.29:9006/MWGate/wmgw.asmx?wsdl',
  pszSubPort: '*',
  debug: false,
  logger: () => {}
}

options's property list as below:

NametypeDescriptionRequirement
wsdlstringWSDLoptional
pszSubPortstringsub portoptional
usernamestringThe userIdrequired
userpassstringThe passwordrequired
debugboolDebug toggleoptional
loggerfunctionA logger handleroptional
proxystringProxy for someone behind a firewalloptional
timeoutintegerTimeout for requestoptional

logger function accept only one argument msg like

(msg) => {
  // do some thing...
}
NametypeDescriptionRequirement
msgstringLog messageoptional

mengwang.sendSms(mobile, content)

Send sms content to mobile

NametypeDescriptionRequirement
mobilestring/arrayUser's mobile to receive smsrequired
contentstringToken playedrequired

License

MIT License. See the LICENSE file.

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago