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
33b6f6a6
Commit
33b6f6a6
authored
Mar 16, 2014
by
lanrion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated README.md
parent
29a4b83e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
20 deletions
+36
-20
README.md
+36
-20
No files found.
README.md
View file @
33b6f6a6
...
@@ -4,15 +4,15 @@
...
@@ -4,15 +4,15 @@
Add this line to your application's Gemfile:
Add this line to your application's Gemfile:
gem 'weixin_authorize'
gem 'weixin_authorize'
And then execute:
And then execute:
$ bundle
$ bundle
Or install it yourself as:
Or install it yourself as:
$ gem install weixin_authorize
$ gem install weixin_authorize
## Usage
## Usage
...
@@ -46,48 +46,64 @@ $client ||= WeixinAuthorize::Client.new(ENV["APPID"], ENV["APPSECRET"])
...
@@ -46,48 +46,64 @@ $client ||= WeixinAuthorize::Client.new(ENV["APPID"], ENV["APPSECRET"])
*
[
分组管理接口
](
http://mp.weixin.qq.com/wiki/index.php?title=分组管理接口
)
*
[
分组管理接口
](
http://mp.weixin.qq.com/wiki/index.php?title=分组管理接口
)
*
创建分组
*
创建分组:
`group = $client.create_group("test")`
`group = $client.create_group("test")`
*
查询所有分组
*
查询所有分组:
`groups = $client.groups`
`groups = $client.groups`
*
查询用户所在分组
*
查询用户所在分组:
`group = $client.get_group_for(ENV["OPENID"])`
`group = $client.get_group_for(ENV["OPENID"])`
*
修改分组名
*
修改分组名:
`group = $client.update_group_name(ENV["OPENID"], "new_group_name")`
`group = $client.update_group_name(ENV["OPENID"], "new_group_name")`
*
移动用户分组
*
移动用户分组:
`group = $client.update_group_for_openid(ENV["OPENID"], "to_groupid")`
`group = $client.update_group_for_openid(ENV["OPENID"], "to_groupid")`
### 自定义菜单
### 自定义菜单
*
[
自定义菜单创建接口
](
http://mp.weixin.qq.com/wiki/index.php?title=自定义菜单创建接口
)
*
[
自定义菜单创建接口
](
http://mp.weixin.qq.com/wiki/index.php?title=自定义菜单创建接口
)
`response = $client.create_menu(menu)`
`response = $client.create_menu(menu)`
*
[
自定义菜单查询接口
](
http://mp.weixin.qq.com/wiki/index.php?title=自定义菜单查询接口
)
*
[
自定义菜单查询接口
](
http://mp.weixin.qq.com/wiki/index.php?title=自定义菜单查询接口
)
`response = $client.menu`
`response = $client.menu`
*
[
自定义菜单删除接口
](
http://mp.weixin.qq.com/wiki/index.php?title=自定义菜单删除接口
)
*
[
自定义菜单删除接口
](
http://mp.weixin.qq.com/wiki/index.php?title=自定义菜单删除接口
)
`response = $client.delete_menu`
`response = $client.delete_menu`
### [发送客服信息](http://mp.weixin.qq.com/wiki/index.php?title=发送客服信息)
### [发送客服信息](http://mp.weixin.qq.com/wiki/index.php?title=发送客服信息)
*
发送文本信息
*
发送文本信息:
`send_text_custom(to_user, content)`
`$client.send_text_custom(to_user, content)`
*
发送图片信息:
`$client.send_image_custom(to_user, media_id)`
*
发送语音消息:
`$client.send_voice_custom(to_user, media_id)`
*
发送图片信息
*
发送视频消息:
`sent_image_custom(to_user, media_id)`
*
发送语音消息
`$client.send_video_custom(to_user, media_id, options)`
`sent_voice_custom(to_user, media_id)`
*
发送视频消息
*
发送音乐消息:
`sent_video_custom(to_user, media_id, options)`
*
发送音乐消息
`$client.send_music_custom(to_user, media_id, musicurl, hqmusicurl, options)`
`sent_music_custom(to_user, media_id, musicurl, hqmusicurl, options)`
*
发送图文消息
*
发送图文消息:
`send_news_custom(to_user, *articles)`
`$client.send_news_custom(to_user, *articles)`
## Contributing
## Contributing
...
...
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