Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Edited lib/twitter/client/tweets.rb via GitHub #187

Merged
merged 1 commit into from

2 participants

@juanmah

The example of update_with_media doesn't work because command name is not correct, and one argument misses an apostrophe.

@sferik sferik merged commit e153480 into sferik:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 9, 2011
  1. @juanmah
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/twitter/client/tweets.rb
View
4 lib/twitter/client/tweets.rb
@@ -67,10 +67,10 @@ def update(status, options={})
# @see http://dev.twitter.com/docs/api/1/post/statuses/update_with_media
# @example Update the authenticating user's status
# When you have a File instance (e.g. the pic is already on your disk)
- # Twitter.update("I just posted a status update with a pic via the Twitter Ruby Gem!", File.new('my_awesome_pic.jpeg))
+ # Twitter.update_with_media("I just posted a status update with a pic via the Twitter Ruby Gem!", File.new('my_awesome_pic.jpeg'))
# When you have an IO instance (e.g. your pic is on S3 and you don't want to write a temp file on the disk),
# download the pic and put the response in a StringIO object
- # Twitter.update("I just posted a status update with a pic via the Twitter Ruby Gem!", {'io' => StringIO.new(pic), 'type' => 'jpg'})
+ # Twitter.update_with_media("I just posted a status update with a pic via the Twitter Ruby Gem!", {'io' => StringIO.new(pic), 'type' => 'jpg'})
def update_with_media(status, image, options={})
response = post('1/statuses/update_with_media', options.merge('media[]' => image, 'status' => status), :endpoint => media_endpoint)
format.to_s.downcase == 'xml' ? response['status'] : response
Something went wrong with that request. Please try again.