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

hhxx-wechat-enterprise-api

v1.0.0

Published

微信公共平台企业号版本Node API库 - huahongxinxin 更新版

Downloads

4

Readme

wechat enterprise api - updated by huahongxinxin

微信公共平台企业号版主动调用API

模块状态

  • NPM version
  • Build Status
  • Dependencies Status
  • Coverage Status

功能列表

  • 主动消息
  • 菜单操作
  • 部门管理
  • 用户管理
  • 标签管理
  • 媒体文件
  • OAuth API(授权、获取基本信息)
  • JS SDK 授权
  • 管理企业号应用
  • 通讯录批量操作接口
  • 永久素材管理接口
  • 企业号摇一摇周边接口

变更列表

  • 增加标签成员支持部门

详细文档

通过代理服务器访问

场景

对于大规模的集群部署模式,为了安全和速度,会有一些负载均衡的节点放在内网的服务器上(即负载均衡的节点与主结点通过内网连接,并且内网服务器上没有外网的IP)。这时,就需要配置代理服务器来使内网的机器可以有限度的访问外网的资源。例如:微信套件中的各种主动调用接口。

如何架设代理服务器在这里不做赘述,一般推荐使用squid 3,免费、快速、配置简单。

技术原理

由于需要访问的微信API服务器是https协议,所以普通的http代理模式不能使用。 而一般都是http协议的代理服务器。 我们要实现的就是通过http代理通道来走https的请求。

基本的步骤是2步:

  • 连接到代理服务器,发送CONNECT命令,打开一个TCP连接。
  • 使用上一步打开的TCP连接,发送https的请求。

实现步骤

一、下载node-tunnel 注意:npm上的版本较老,不支持node v0.10以上的版本。

二、使用 httpsOverHttp 这个agent。

三、将agent配置给urllib,通过urllib的beforeRequest这个方法。

var tunnel = require('tunnel');

var agent = tunnel.httpsOverHttp({
  proxy: {
    host: 'proxy_host_ip',
    port: 3128
  }
});

api.setOpts({
    beforeRequest:function(options){
        options.agent = agent;
    }
});

License

The MIT license.