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
0986bddd
Commit
0986bddd
authored
Mar 16, 2014
by
lanrion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean codes
parent
44882ef5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
lib/weixin_authorize/api/custom.rb
+2
-2
lib/weixin_authorize/api/groups.rb
+0
-2
lib/weixin_authorize/api/user.rb
+2
-2
No files found.
lib/weixin_authorize/api/custom.rb
View file @
0986bddd
...
...
@@ -54,7 +54,7 @@ module WeixinAuthorize
# "media_id":"MEDIA_ID"
# }
# }
def
send_video_custom
(
to_user
,
media_id
,
options
)
def
send_video_custom
(
to_user
,
media_id
,
options
=
{}
)
video_options
=
{
media_id:
media_id
}.
merge
(
options
)
message
=
default_options
(
to_user
).
merge
({
msgtype:
video
,
video:
video_options
})
http_post
(
custom_base_url
,
MultiJson
.
dump
(
message
))
...
...
@@ -73,7 +73,7 @@ module WeixinAuthorize
# "thumb_media_id":"THUMB_MEDIA_ID"
# }
# }
def
send_music_custom
(
to_user
,
media_id
,
musicurl
,
hqmusicurl
,
options
)
def
send_music_custom
(
to_user
,
media_id
,
musicurl
,
hqmusicurl
,
options
=
{}
)
music_options
=
{
thumb_media_id:
media_id
,
musicurl:
musicurl
,
hqmusicurl:
hqmusicurl
}.
merge
(
options
)
message
=
default_options
(
to_user
).
merge
({
msgtype:
music
,
music:
music_options
})
...
...
lib/weixin_authorize/api/groups.rb
View file @
0986bddd
...
...
@@ -9,7 +9,6 @@ module WeixinAuthorize
create_url
=
"
#{
group_base_url
}
/create"
group
=
MultiJson
.
dump
({
group:
{
name:
group_name
}})
http_post
(
create_url
,
group
)
end
# 查询所有分组
...
...
@@ -25,7 +24,6 @@ module WeixinAuthorize
group_url
=
"
#{
group_base_url
}
/getid"
openid
=
MultiJson
.
dump
({
openid:
openid
})
http_post
(
group_url
,
openid
)
end
# 修改分组名
...
...
lib/weixin_authorize/api/user.rb
View file @
0986bddd
...
...
@@ -11,9 +11,9 @@ module WeixinAuthorize
http_get
(
user_info_url
,
{
openid:
openid
,
lang:
lang
})
end
# https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID
# 获取关注者列表
def
followers
(
next_openid
=
nil
)
# https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID
def
followers
(
next_openid
=
""
)
followers_url
=
"
#{
user_base_url
}
/get"
http_get
(
followers_url
,
{
next_openid:
next_openid
})
end
...
...
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