Commit 1d465ca7 by lanrion

added upload_news api

parent 5e9c942b
......@@ -22,6 +22,32 @@ module WeixinAuthorize
download_media_url
end
# 上传图文消息素材
# {
# "articles": [
# {
# "thumb_media_id":"mwvBelOXCFZiq2OsIU-p",
# "author":"xxx",
# "title":"Happy Day",
# "content_source_url":"www.qq.com",
# "content":"content",
# "digest":"digest"
# },
# {
# "thumb_media_id":"mwvBelOXCFZiq2OsIU-p",
# "author":"xxx",
# "title":"Happy Day",
# "content_source_url":"www.qq.com",
# "content":"content",
# "digest":"digest"
# }
# ]
# }
def upload_news(news)
upload_news_url = "#{media_base_url}/uploadnews"
http_post(upload_news_url, {articles: news})
end
private
def process_file(media)
......
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