🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

dingtalk-node

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dingtalk-node

dingtalk sdk for nodejs

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

钉钉SDK node版

使用方法

安装

npm install dingtalk-node

使用

var API = require('dingtalk-node');

var api = new API({
    domain: 'https://oapi.dingtalk.com',
    cid: 'CorpID',
    secret: 'CorpSecret',
    redirect_uri: 'REDIRECT_URI'
});


//获取部门列表
api.departmentList(function(err, res) {
    var ds = res.department;
    ds.forEach(function(item) {
        console.log(item);
    })
});

API列表

API命名为驼峰式,转换规则为lodash#camelCase 例如:

//获取部门列表接口
department/list

//获取部门成员
user/simplelist

//注册事件回调接口
call_back/register_call_back

转为

departmentList

userSimplelist

callBackRegisterCallBack

调用时

//获取部门列表
api.departmentList(function(err, res) {
	console.log(res);
})

//获取部门成员
api.userSimplelist({department_id: 1}, function(err, res) {
	console.log(res);
})

//注册事件回调
api.callBackRegisterCallBack({
    call_back_tag: [],
    token: '',
    aes_key: '',
    url: ''
}, function(err, res){
	console.log(res);
})

钉钉api列表请参考官方文档

Keywords

dingtalk

FAQs

Package last updated on 24 Jun 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