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

node-weixin-user

v0.6.0

Published

user apis for weixin

Downloads

37

Readme

node-weixin-user NPM version Build Status Dependency Status Coverage percentage

node weixin module for use or its management 微信用户API和命令行工具

微信用户API是(node-weixin-api 或者 node-weixin-express)的一个子项目。 它提供:

  1. 菜单API共计8个:

list: 列举订阅用户

profile: 返回用户资料

remark: 修改昵称

group.get: 获取组列表

group.create: 创建新组

group.in: 获取用户组名

group.update: 更新组名

group.move: 修改用户组属性

  1. 所有数据返回格式采用json,并与腾讯api上说明一致。回调函数格式如下: function(error, json) { //error为false表示返回正常 //json对应api说明 }

交流QQ群: 39287176

注:

node-weixin-express是基于node-weixin-*的服务器端参考实现。

node-weixin-api是基于node-weixin-*的API接口SDK。

它们都是由下列子项目组合而成:

  1. node-weixin-config 用于微信配置信息的校验

  2. node-weixin-auth 用于与微信服务器握手检验

  3. node-weixin-util 一些常用的微信请求,加密,解密,检验的功能与处理

  4. node-weixin-request 微信的各类服务的HTTP请求的抽象集合

  5. node-weixin-oauth 微信OAuth相关的操作

  6. node-weixin-pay 微信支付的服务器接口

  7. node-weixin-jssdk 微信JSSDK相关的服务器接口

  8. node-weixin-menu 微信菜单相关的操作与命令

Install

$ npm install --save node-weixin-user

Usage

var nodeWeixinUser = require('node-weixin-user');
var settings = require('node-weixin-settings');
  var app = {
    id: process.env.APP_ID,
    secret: process.env.APP_SECRET,
    token: process.env.APP_TOKEN
  };
  var auth = require("node-weixin-auth");
  var config = require("node-weixin-config");
  config.app.init(app);

  //用户操作
  //更新备注
  nodeWeixinUser.remark(settings, app, process.env.APP_OPENID, '新备注', function (error, data) {
  });

  //获取用户信息
  nodeWeixinUser.profile(settings, app, process.env.APP_OPENID, function (error, data) {
  });

  //获取用户列表
  nodeWeixinUser.list(settings, app, null, function (error, data) {
  });

  //组操作
  //获取组信息
  nodeWeixinUser.group.get(settings, app, function (error, data) {
  });

  //创建组
  nodeWeixinUser.group.create(settings, app, 'hello', function (error, data) {
  });

  //获取用户组名
  nodeWeixinUser.group.in(settings, app, openid, function (error, data) {
  });

  //更新组信息
  nodeWeixinUser.group.update(settings, app, gGroup.id, 'new name', function (error, data) {
  });

  //移动用户组属性
  nodeWeixinUser.group.move(settings, app, gGroup.id, process.env.APP_OPENID, function (error, data) {
  });

License

Apache-2.0 © calidion