| 1.9.3-p484 :013 > tn.client.update_with_media('dd', { 'io' => StringIO.new(Asset.last.asset.file.read), 'type' => Asset.last.content_type} ) | |
| Asset Load (0.4ms) SELECT `assets`.* FROM `assets` ORDER BY `assets`.`id` DESC LIMIT 1 | |
| From: /Users/jankoszewski/.rvm/gems/ruby-1.9.3-p484/gems/twitter-4.6.2/lib/twitter/api/tweets.rb @ line 205 Twitter::API::Tweets#update_with_media: | |
| 204: def update_with_media(status, media, options={}) | |
| => 205: binding.pry | |
| 206: object_from_response(Twitter::Tweet, :post, "/1.1/statuses/update_with_media.json", options.merge('media[]' => media, 'status' => status)) | |
| 207: end | |
| [1] pry(#<Twitter::Client>)> next | |
| From: /Users/jankoszewski/.rvm/gems/ruby-1.9.3-p484/gems/twitter-4.6.2/lib/twitter/api/utils.rb @ line 82 Twitter::API::Utils#object_from_response: | |
| 81: def object_from_response(klass, request_method, path, options={} ) | |
| => 82: binding.pry | |
| 83: response = send(request_method.to_sym, path, options) | |
| 84: klass.from_response(response) | |
| 85: end | |
| [1] pry(#<Twitter::Client>)> next | |
| From: /Users/jankoszewski/.rvm/gems/ruby-1.9.3-p484/gems/twitter-4.6.2/lib/twitter/client.rb @ line 70 Twitter::Client#post: | |
| 68: def post(path, params={}) | |
| 69: signature_params = params.values.any?{|value| value.respond_to?(:to_io)} ? {} : params | |
| => 70: binding.pry | |
| 71: request(:post, path, params, signature_params) | |
| 72: end | |
| [1] pry(#<Twitter::Client>)> next | |
| From: /Users/jankoszewski/.rvm/gems/ruby-1.9.3-p484/gems/twitter-4.6.2/lib/twitter/client.rb @ line 82 Twitter::Client#request: | |
| 81: def request(method, path, params={}, signature_params=params) | |
| => 82: binding.pry | |
| 83: connection.send(method.to_sym, path, params) do |request| | |
| 84: request.headers[:authorization] = auth_header(method.to_sym, path, signature_params).to_s | |
| 85: raise request.inspect | |
| 86: end.env | |
| 87: rescue Faraday::Error::ClientError | |
| 88: raise Twitter::Error::ClientError | |
| 89: rescue MultiJson::DecodeError | |
| 90: raise Twitter::Error::DecodeError | |
| 91: end | |
| [1] pry(#<Twitter::Client>)> next | |
| RuntimeError: #<struct Faraday::Request method=:post, path="/1.1/statuses/update_with_media.json", params={}, headers={"Accept"=>"application/json", "User-Agent"=>"Twitter Ruby Gem 4.6.2", "Authorization"=>"OAuth oauth_consumer_key=\"e0BXaCbzc3GrPABMCj2w\", oauth_nonce=\"ee1c6116e1beeffa232f1cffb726cfee\", oauth_signature=\"Q7dOmQokYFttcwHu0c9vItyUbVQ%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1393445148\", oauth_token=\"608424371-Ei6vojEXe1rfkAigLVkXF0eQaWoRRhEv4UdUgOrW\", oauth_version=\"1.0\""}, body={"media[]"=>{"io"=>#<StringIO:0x007fa9be5a3150>, "type"=>"image/jpeg"}, "status"=>"dd"}, options=#<Faraday::RequestOptions timeout=10, open_timeout=5>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment