forked from node-weixin/node-weixin-user
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
32 lines (31 loc) · 721 Bytes
/
index.js
File metadata and controls
32 lines (31 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'use strict';
var send = require("./lib/send");
var get = require('./lib/get');
module.exports = {
group: require('./lib/group'),
remark: function(app, openId, remark, cb) {
send(app,
'https://api.weixin.qq.com/cgi-bin/user/info/updateremark?',
{
openid: openId,
remark: remark
},
cb
);
},
profile: function(app, openId, cb) {
get(app, 'https://api.weixin.qq.com/cgi-bin/user/info?', {
openid: openId,
lang: 'zh_CN'
}, cb);
},
list: function(app, openid, cb) {
var params = {};
if (openid) {
params = {
next_openid: openid
};
}
get(app, 'https://api.weixin.qq.com/cgi-bin/user/get?', params, cb);
}
};