Commit 0986bddd by lanrion

clean codes

parent 44882ef5
......@@ -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})
......
......@@ -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
# 修改分组名
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment