1.0.10 • Published 9 years ago

workplus-api v1.0.10

Weekly downloads
2
License
MIT
Repository
github
Last release
9 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

9 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago