Socket
Book a DemoInstallSign in
Socket

node-yunpian

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-yunpian

Yunpian api

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Yunpian API

Usage

npm install node-yunpian --save

var yunpian = require('node-yunpian')(apikey)

API

账户

获取账户信息

yunpian
  .user
  .show()
  .then(onsuccess)
  .catch(onerror)

更新账户信息

yunpian
  .user
  .update({
    emergency_contact: 'XX'
  })
  .then(onsuccess)
  .catch(onerror)

短信

发送短信

yunpian
 .sms
 .send(mobile, text)
 .then(onsuccess)
 .catch(onerror)

发送模版短信

yunpian
  .sms
  .sendWithTemplate(mobile, 2, { '#company#': 'XXXX', '#code#': '2223' })
  .then(onsuccess)
  .catch(onerror)

获取回复列表

yunpian
  .sms
  .getReplies({
    start_time: '2015-01-01 00:00:00',
    end_time: '2015-12-22 24:00:00',
    page_num: 1,
    page_size: 10,
  })
  .then(onsuccess)
  .catch(onerror)

获取发送记录列表

yunpian
  .sms
  .getRecords({
    start_time: '2015-01-01 00:00:00',
    end_time: '2015-12-22 24:00:00',
    page_num: 1,
    page_size: 10,
    phone: 'xxxxxxxxxxx',
  })
  .then(onsuccess)
  .catch(onerror)

获取黑名单

yunpian
  .sms
  .getBlackWords('欢迎报名')
  .then(onsuccess)
  .catch(onerror)

短信群发

yunpian
  .sms
  .multiSend(mobile, text)
  .then(onsuccess)
  .catch(onerror)

语音

发送语音

yunpian
  .voice
  .send(mobile, '222222')
  .then(onsuccess)
  .catch(onerror)

Keywords

云片

FAQs

Package last updated on 22 Dec 2015

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.