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-message

v0.1.1

Published

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url] > Weixin message handling

Downloads

251

Readme

node-weixin-message

NPM version Build Status Dependency Status Coverage percentage

Weixin message handling

微信消息处理

反馈与帮助

nodejs微信开发交流QQ群: 39287176

node-weixin项目的子项目

node-weixin项目是一个旨在帮助微信开发与使用的全面的技术支持平台项目。

目前最主要集成项目是

  1. node-weixin-express 它是基于node-weixin-api与node web服务器而实现的服务器实现参考实现。

  2. node-weixin-api 它是基于node-weixin-*所实现的API所组合而成的接口。

安装

$ npm install --save node-weixin-message

使用

var nodeWeixinMessage = require('node-weixin-message');


//在http请求里的处理方式
app.get('weixin/text', function(req, res) {
  var messages = nodeWeixinMessage.messages;

  function text(message, res, callback, extra) {
    //message => 解析后的JSON
    //res => res
    //callback => callback
    //extra => 'some data',

    //Extra
    res.send(message);
  }

  //多次侦听相同的回调函数只会被调用一次
  messages.on.text(text);
  messages.on.text(text);
  messages.on.text(text);
  messages.onXML(req.body, res, function callback(message) {
    //After message handled.
  }
  //后面可以接系统允许的最大数量的参数,只要跟text的处理函数一一对应就可以了。
  //唯一不同的是req.body会被解析成JSON
  //,
  //'some data');

});

消息处理

公共号消息

用户消息处理接口

公共号事件处理接口

回复用户消息

发送模板消息

客户API

客服API消息回复

客服接待列表信息

service.account.list(settings, app, function (error, data) {
  //data
});

客服在线接待信息

service.account.online(settings, app, function (error, data) {
  //data.kf_online_list
});

模板消息管理

service.manage.industry(settings, app, 1, 2, function (error, data ) {
  //data.errcode
  //data.errmsg
});

service.manage.template(settings, app, 'TM00015', function (error, data ) {
  //data.errcode
  //data.errmsg
});

License

Apache-2.0 © calidion