1.0.10 • Published 7 years ago

workplus-api v1.0.10

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

WorkPlus API for Node.js

NPM

Build Status Coverage Status David

Install

$ npm install workplus-api --save

Usage

项目启动初始化模块

let WorkPlus = require('workplus-api');

let workplus = new WorkPlus({
    api: 'https://api3.workplus.io/v1',
    domain: 'atwork',
    key: 'xxxxx',
    secret: 'xxxxx',
    orgId: 'xxxxx'
});

workplus.initAccessToken();

API列表

  • 初始化token
workplus.initAccessToken()
  • 验证ticket
  workplus.verifyTicket(ticket, clientId, orgId).then(function(data) {

  }).catch(function(e) {

  })
  • 上传图片
  workplus.uploadImage(file).then(function(data) {

  }).catch(function(e) {

  })
  • 拼装媒体下载地址
  workplus.assembleMediaDownloadURL(mediaId)
  • 推送文本消息
  workplus.pushTextMessage(message).then(function(data) {

  }).catch(function(e) {

  })
  • 推送图文消息
  workplus.pushArticleMessage(message).then(function(data) {

  }).catch(function(e) {

  })

License

MIT

1.0.10

7 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago