New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tw-sms

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tw-sms

[![Version npm](https://img.shields.io/npm/v/tw-sms.svg)](https://www.npmjs.com/package/tw-sms)

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

tw-sms

Version npm

trend wood sms module.

install

npm install tw-sms

set up

development env

you can create config.js.

and then, add some config in it, just like below:

module.exports = {
  sms_opts: {
    apikey: 'your apikey'   // get key from www.yunpian.com
  }
};

production env

you don't need config sms's apikey anymore.

and you should start node like this:

SMS_KEY=yourkey node app.js

usage

var config = require('config');
var tw_sms = require('tw-sms')(config.sms_opts.apikey);

// sms send
let options1 = {
  mobile: '18523975118',
  text: '您的验证码是5201314'
};
tw_sms.send(options1, callback);

// sms get reply
let options2 = {
  start_time: '2015-12-25 00:00:00',
  end_time: '2015-12-30 00:00:00',
  page_num: 1,
  page_size: 100
}
tw_sms.getReply(options2, callback);

// sms get record
let options3 = {
  start_time: '2015-12-25 00:00:00',
  end_time: '2015-12-30 00:00:00',
  page_num: 1,
  page_size: 100
}
tw_sms.getReply(options3, callback);

documents

参数与返回值

test

npm install
npm test

FAQs

Package last updated on 04 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts