Sha256: 3152585ee89f0a23ab3f9022b826479df7a4b5b4631ded197021cce7057b6864

Contents?: true

Size: 371 Bytes

Versions: 25

Compression:

Stored size: 371 Bytes

Contents

#!/usr/bin/env ruby
$:.unshift File.expand_path '../lib', File.dirname(__FILE__)
require 'rubygems'
require 'tw'

if ARGV.empty?
  STDERR.puts "ruby #{$0} image.jpg"
  STDERR.puts "ruby #{$0} image.jpg USERNAME"
  exit 1
end

icon, user = ARGV

client = Tw::Client.new
client.auth user

File.open icon do |f|
  puts 'upload success' if Twitter.update_profile_image f
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
tw-1.0.1 samples/update_profile_image.rb
tw-1.0.0 samples/update_profile_image.rb
tw-0.5.2 samples/update_profile_image.rb
tw-0.5.1 samples/update_profile_image.rb
tw-0.5.0 samples/update_profile_image.rb
tw-0.4.9 samples/update_profile_image.rb
tw-0.4.8 samples/update_profile_image.rb
tw-0.4.7 samples/update_profile_image.rb
tw-0.4.6 samples/update_profile_image.rb
tw-0.4.5 samples/update_profile_image.rb
tw-0.4.4 samples/update_profile_image.rb
tw-0.4.3 samples/update_profile_image.rb
tw-0.4.2 samples/update_profile_image.rb
tw-0.4.1 samples/update_profile_image.rb
tw-0.4.0 samples/update_profile_image.rb
tw-0.3.9 samples/update_profile_image.rb
tw-0.3.8 samples/update_profile_image.rb
tw-0.3.7 samples/update_profile_image.rb
tw-0.3.6 samples/update_profile_image.rb
tw-0.3.5 samples/update_profile_image.rb