Sha256: 1097101629f3d085392fabb2ca834ef3f51b45df60a72b3b59c88f698aae84d8

Contents?: true

Size: 381 Bytes

Versions: 17

Compression:

Stored size: 381 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 Tw::Client.client.update_profile_image f
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
tw-1.3.1 samples/update_profile_image.rb
tw-1.3.0 samples/update_profile_image.rb
tw-1.2.1 samples/update_profile_image.rb
tw-1.2.0 samples/update_profile_image.rb
tw-1.1.1 samples/update_profile_image.rb
tw-1.1.0 samples/update_profile_image.rb
tw-1.0.12 samples/update_profile_image.rb
tw-1.0.11 samples/update_profile_image.rb
tw-1.0.10 samples/update_profile_image.rb
tw-1.0.9 samples/update_profile_image.rb
tw-1.0.8 samples/update_profile_image.rb
tw-1.0.7 samples/update_profile_image.rb
tw-1.0.6 samples/update_profile_image.rb
tw-1.0.5 samples/update_profile_image.rb
tw-1.0.4 samples/update_profile_image.rb
tw-1.0.3 samples/update_profile_image.rb
tw-1.0.2 samples/update_profile_image.rb