Skip to content

Instantly share code, notes, and snippets.

@ubermajestix
Created May 12, 2009 19:01
Show Gist options
  • Save ubermajestix/110661 to your computer and use it in GitHub Desktop.
Save ubermajestix/110661 to your computer and use it in GitHub Desktop.
require 'twitter'
require 'pp'
puts 'User', '*'*50
pp Twitter.user('ubermajestix')
# {"profile_sidebar_fill_color"=>"ffffff",
# "name"=>"Tyler Montgomery",
# "status"=>
# {"truncated"=>false,
# "favorited"=>false,
# "text"=>
# "Jumped off the jQuery cliff today. Freefall feels awkward at first, then its kinda nice.",
# "id"=>1768188690,
# "in_reply_to_status_id"=>nil,
# "in_reply_to_user_id"=>nil,
# "source"=>"<a href=\"http://www.atebits.com/\">Tweetie</a>",
# "in_reply_to_screen_name"=>nil,
# "created_at"=>"Mon May 11 23:49:56 +0000 2009"},
# "profile_link_color"=>"00ACFF",
# "profile_sidebar_border_color"=>"00ACFF",
# "profile_background_tile"=>false,
# "favourites_count"=>0,
# "url"=>"http://www.ubermajestix.com",
# "id"=>14989159,
# "description"=>"",
# "profile_text_color"=>"656963",
# "utc_offset"=>-25200,
# "protected"=>false,
# "notifications"=>nil,
# "time_zone"=>"Mountain Time (US & Canada)",
# "profile_background_color"=>"f0f0f0",
# "screen_name"=>"ubermajestix",
# "profile_background_image_url"=>
# "http://s3.amazonaws.com/twitter_production/profile_background_images/3738877/self_09_08.png",
# "followers_count"=>139,
# "friends_count"=>100,
# "statuses_count"=>657,
# "following"=>nil,
# "created_at"=>"Tue Jun 03 04:24:08 +0000 2008",
# "profile_image_url"=>
# "http://s3.amazonaws.com/twitter_production/profile_images/54978650/me1_normal.jpg",
# "location"=>"Boulder, CO"}
followers = Twitter.follower_ids('ubermajestix')
# => [14073663, 6128392, 6164712, 1438261, 14601522, 15399388, 15446607, 1565501, 9483652, 6272722, 14480362, 6083342, 11582182, 16834727, 16855010, 17429985, 17238404, 14630648, 14522630, 17905197, 16420441, 16857468, 3670341, 5931692, 14381877, 17875219, 6112572, 17241396, 8233892, 18220106, 16582309, 7989792, 4576911, 823615, 15062875, 4374531, 17994702, 16731468, 16797616, 17632945, 5907052, 16474612, 15347089, 12687402, 9980812, 14232173, 13776662, 9667272, 2783151, 14595846, 11738792, 52593, 6319982, 10578, 15626165, 18251154, 15042927, 6655322, 18205144, 6258202, 722793, 8946242, 15695130, 16808886, 17285454, 17218325, 17496502, 1169451, 14217249, 19412819, 19376035, 15730969, 19405541, 19403888, 19696781, 6148812, 18929813, 20076186, 18083235, 20160224, 20121547, 20535356, 4380901, 9808812, 16027073, 20618001, 20727178, 13024992, 20540031, 15220688, 19417951, 7495882, 15301151, 21404171, 21420758, 11046582, 717233, 713263, 15007939, 22277338, 22199878, 5881482, 13068302, 20976247, 17980237, 1768041, 22560468, 25556623, 14207804, 25580324, 21468678, 28916199, 27357022, 30259355, 30540610, 14627665, 22850207, 30039979, 27235833, 12703252, 17058191, 35052293, 14592049, 14233577, 14510008, 16539159, 33101442, 36718679, 36411938, 29606915, 34311385, 36915714, 19862011, 15447352, 36563527, 15833443, 29383194, 14389187, 18615858, 20168709]
#
puts 'Random Follower', '*'*50
pp Twitter.user(followers[rand(followers.length)])
# {"name"=>"SharpieRant.com",
# "status"=>
# {"truncated"=>false,
# "favorited"=>false,
# "text"=>
# "Thanks to @bigwags, @McleveyArtist, @jmb252 and @DMBSFgirl for the latest round of sharpierants! Up at http://sharpierant.com!",
# "id"=>1267817339,
# "in_reply_to_user_id"=>nil,
# "in_reply_to_status_id"=>nil,
# "source"=>"web",
# "in_reply_to_screen_name"=>nil,
# "created_at"=>"Mon Mar 02 03:26:06 +0000 2009"},
# "profile_sidebar_fill_color"=>"252429",
# "profile_sidebar_border_color"=>"181A1E",
# "profile_background_tile"=>false,
# "profile_link_color"=>"2FC2EF",
# "url"=>"http://sharpierant.com",
# "favourites_count"=>0,
# "id"=>20121547,
# "description"=>
# "A place for sharpie lovers around the world to share their passion! Tweet us your art!",
# "utc_offset"=>-25200,
# "profile_text_color"=>"666666",
# "protected"=>false,
# "notifications"=>false,
# "screen_name"=>"sharpierant",
# "profile_background_color"=>"1A1B1F",
# "time_zone"=>"Mountain Time (US & Canada)",
# "statuses_count"=>41,
# "followers_count"=>582,
# "friends_count"=>1254,
# "profile_background_image_url"=>
# "http://static.twitter.com/images/themes/theme9/bg.gif",
# "profile_image_url"=>
# "http://s3.amazonaws.com/twitter_production/profile_images/75584912/1300019_id_normal.jpg",
# "following"=>false,
# "created_at"=>"Thu Feb 05 05:07:50 +0000 2009",
# "location"=>""}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment