Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weixin_authorize
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
weixin_authorize
Commits
e2cbdb5c
Commit
e2cbdb5c
authored
Jan 14, 2016
by
Alex Gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add batch get user info api
parent
313709e9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
lib/weixin_authorize/api/user.rb
+22
-0
No files found.
lib/weixin_authorize/api/user.rb
View file @
e2cbdb5c
...
@@ -11,6 +11,28 @@ module WeixinAuthorize
...
@@ -11,6 +11,28 @@ module WeixinAuthorize
http_get
(
user_info_url
,
{
openid:
openid
,
lang:
lang
})
http_get
(
user_info_url
,
{
openid:
openid
,
lang:
lang
})
end
end
# 批量获取用户基本信息
# https://api.weixin.qq.com/cgi-bin/user/info/batchget?access_token=ACCESS_TOKEN
# POST数据格式:JSON
# POST数据例子:
# {
# "user_list": [
# {
# "openid": "otvxTs4dckWG7imySrJd6jSi0CWE",
# "lang": "zh-CN"
# },
# {
# "openid": "otvxTs_JZ6SEiP0imdhpi50fuSZg",
# "lang": "zh-CN"
# }
# ]
# }
def
users
(
user_list
)
user_info_batchget_url
=
"
#{
user_base_url
}
/info/batchget"
post_body
=
user_list
http_post
(
user_info_batchget_url
,
post_body
)
end
# 获取关注者列表
# 获取关注者列表
# https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID
# https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID
def
followers
(
next_openid
=
""
)
def
followers
(
next_openid
=
""
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment