Commit 7bf1a92f by lanrion

refactor media api

parent 94e46abe
...@@ -15,7 +15,7 @@ module WeixinAuthorize ...@@ -15,7 +15,7 @@ module WeixinAuthorize
# 目前仅仅把下载链接返回给第三方开发者,由第三方开发者处理下载 # 目前仅仅把下载链接返回给第三方开发者,由第三方开发者处理下载
def download_media_url(media_id) def download_media_url(media_id)
download_media_url = file_endpoint + "#{media_base_url}/get" download_media_url = WeixinAuthorize.endpoint_url("file", "#{media_base_url}/get")
params = URI.encode_www_form("access_token" => get_access_token, params = URI.encode_www_form("access_token" => get_access_token,
"media_id" => media_id) "media_id" => media_id)
download_media_url += "?#{params}" download_media_url += "?#{params}"
......
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