Skip to content
Browse files

Merge pull request #10 from sandyxu/master

add query argument to upload()
  • Loading branch information...
2 parents e247a46 + f8fe719 commit 96280f6ba35995be936aa8f5983463124f5bb996 @ballantyne committed Feb 14, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/weibo/base.rb
View
8 lib/weibo/base.rb
@@ -93,9 +93,11 @@ def mentions(query={})
end
- def upload(status, file)
- PostBodyHack.apply_hack(:status => status) do
- perform_post("/statuses/upload.json", build_multipart_bodies(:pic => file, :status => status))
+ #statuses/upload 发送带图片的微博,可带地理位置信息
+ #options: status, pic, lat, long
+ def upload(status, file, query={})
+ PostBodyHack.apply_hack({:status => status}.merge(query)) do
+ perform_post("/statuses/upload.json", build_multipart_bodies({:pic => file, :status => status}.merge(query)))
end
end

0 comments on commit 96280f6

Please sign in to comment.
Something went wrong with that request. Please try again.