npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fanqier-dingtalk

v0.0.3

Published

钉钉的非官方sdk

Downloads

4

Readme

dingTalk

1.install

  npm i fanqier-dingtalk

2.example

var token = ;
var encode_aes_key = '';
var suitekey = '';
var suitesecret = '';

const DingTalk = require('fanqier-dingtalk');

var dingTalk = DingTalk(token, encode_aes_key, suitekey, suitesecret);

//回调接口信息解密
dingTalk.decrypt(encryptInfo);

//信息加密
dingTalk.encrypt(plainText);

//签名,⚠️在接口回调时签名用的随机字符串和时间戳一定是url参赛中传来的(这个设定也是心碎了)
dingTalk.signature(encrypt, nonce, timestamp);

//ticket换取 suite_access_token
dingTalk.suite_access_token(ticket);


// 企业临时授权码 换取 企业永久授权码
dingTalk.permanent_code(suite_access_token, tmp_auth_code);


//激活套件
enable_suite(suite_access_token, corpid, permanent_code);

//获取企业 corp_access_token
corp_access_token(suite_access_token, corpid, permanent_code);

//获取企业的授权信息
corp_auth_info(suite_access_token, corpid, permanent_code);

//-----------------下面是DingTalk的静态方法------------------------
//企业access_token 换取 js_ticket
DingTalk.js_ticket(access_token);

//jsapi签名
DingTalk.jsSignature({
  nonceStr: nonceStr, //随机字符串
  timeStamp: timeStamp, //当前时间戳(10位,前面解密加密的是13位,这也是坑死人不偿命的设定)
  url: url,//本页面的全地址(example: http://xxx.com?xx=ss&xx2=sss2)
  ticket: js_ticket,
});

//获取用户身份信息
DingTalk.getuserinfo(access_token, code);

//获取用户信息
DingTalk.user(access_token, userid);



3.api