bkocik-twitter 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History +194 -0
- data/License +20 -0
- data/Notes +33 -0
- data/README.rdoc +19 -0
- data/Rakefile +105 -0
- data/VERSION.yml +4 -0
- data/examples/connect.rb +30 -0
- data/examples/friendship_existance.rb +13 -0
- data/examples/helpers/config_store.rb +38 -0
- data/examples/httpauth.rb +11 -0
- data/examples/ids.rb +13 -0
- data/examples/search.rb +15 -0
- data/examples/timeline.rb +19 -0
- data/examples/unauthorized.rb +16 -0
- data/examples/update.rb +11 -0
- data/examples/user.rb +5 -0
- data/lib/twitter/base.rb +165 -0
- data/lib/twitter/httpauth.rb +27 -0
- data/lib/twitter/oauth.rb +34 -0
- data/lib/twitter/request.rb +102 -0
- data/lib/twitter/search.rb +106 -0
- data/lib/twitter.rb +66 -0
- data/test/fixtures/firehose.json +1 -0
- data/test/fixtures/follower_ids.json +1 -0
- data/test/fixtures/friend_ids.json +1 -0
- data/test/fixtures/friends_timeline.json +1 -0
- data/test/fixtures/rate_limit_exceeded.json +1 -0
- data/test/fixtures/replies.json +1 -0
- data/test/fixtures/search.json +1 -0
- data/test/fixtures/search_from_jnunemaker.json +1 -0
- data/test/fixtures/status.json +1 -0
- data/test/fixtures/status_show.json +1 -0
- data/test/fixtures/user.json +1 -0
- data/test/fixtures/user_timeline.json +1 -0
- data/test/test_helper.rb +36 -0
- data/test/twitter/base_test.rb +103 -0
- data/test/twitter/httpauth_test.rb +76 -0
- data/test/twitter/oauth_test.rb +71 -0
- data/test/twitter/request_test.rb +217 -0
- data/test/twitter/search_test.rb +144 -0
- data/test/twitter_test.rb +38 -0
- metadata +189 -0
@@ -0,0 +1 @@
|
|
1
|
+
[{"favorited":false,"user":{"profile_link_color":"1DA9DE","description":"oAk is a designer who tweets, but not necessarily about design. I work at the University of Notre Dame.","utc_offset":-18000,"profile_sidebar_fill_color":"ebebeb","followers_count":208,"following":true,"time_zone":"Indiana (East)","profile_sidebar_border_color":"8f8f8f","url":"http:\/\/atimcalledoak.com","name":"-oAk-","notifications":false,"profile_background_tile":false,"friends_count":111,"protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/101535873\/avatarone_normal.png","favourites_count":214,"profile_background_color":"000000","screen_name":"oaknd1","statuses_count":3918,"profile_background_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_background_images\/3616500\/twitterblack.jpg","profile_text_color":"243d5b","location":"iPhone: 41.703415,-86.246094","id":3038211,"created_at":"Sat Mar 31 04:30:35 +0000 2007"},"text":"@jnunemaker cold out today. cold yesterday. even colder today.","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":null,"id":1446039519,"in_reply_to_user_id":4243,"source":"<a href=\"http:\/\/iconfactory.com\/software\/twitterrific\">twitterrific<\/a>","created_at":"Fri Apr 03 15:51:12 +0000 2009"},{"favorited":false,"user":{"description":"Web guy in the making. Design, coding, usability. Typography addict.","statuses_count":2412,"utc_offset":0,"profile_sidebar_fill_color":"f7f7f7","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","following":false,"profile_sidebar_border_color":"ff0007","time_zone":"Lisbon","friends_count":391,"url":"http:\/\/paulozoom.com","name":"Paulo Pereira","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","notifications":false,"profile_background_color":"f0f0f0","screen_name":"paulozoom","profile_background_tile":false,"profile_text_color":"000000","followers_count":350,"location":"Porto, Portugal","id":14452237,"favourites_count":8,"created_at":"Sun Apr 20 15:11:38 +0000 2008","profile_link_color":"ff0007"},"text":"@jnunemaker could you try to do HTTParty.get(\"http:\/\/digg.com\") ? I find myself waiting forever for the response. Posted a ticket on that.","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":null,"id":1445973779,"in_reply_to_user_id":4243,"source":"<a href=\"http:\/\/thecosmicmachine.com\/eventbox\/\">EventBox<\/a>","created_at":"Fri Apr 03 15:40:20 +0000 2009"},{"in_reply_to_screen_name":"jnunemaker","user":{"description":"just another ruby hacker","time_zone":"Eastern Time (US & Canada)","utc_offset":-18000,"profile_text_color":"663B12","followers_count":128,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/66571046\/john7_normal.jpg","following":false,"notifications":false,"profile_background_tile":false,"favourites_count":0,"profile_link_color":"1F98C7","url":"http:\/\/wiseheartdesign.com","screen_name":"johnwlong2000","name":"John W. Long","statuses_count":729,"profile_sidebar_fill_color":"DAECF4","protected":false,"created_at":"Fri Oct 26 02:45:58 +0000 2007","profile_sidebar_border_color":"C6E2EE","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme2\/bg.gif","friends_count":63,"location":"Cary, North Carolina","id":9700282,"profile_background_color":"C6E2EE"},"text":"@jnunemaker An unobtrusive Fancy Zoom image behavior for use with LowPro: http:\/\/gist.github.com\/89299","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":4243,"created_at":"Thu Apr 02 17:23:21 +0000 2009","favorited":false,"id":1439627059,"source":"<a href=\"http:\/\/iconfactory.com\/software\/twitterrific\">twitterrific<\/a>"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","friends_count":390,"description":"Web guy in the making. Design, coding, usability. Typography addict.","utc_offset":0,"profile_sidebar_border_color":"ff0007","following":true,"time_zone":"Lisbon","profile_background_color":"f0f0f0","followers_count":350,"url":"http:\/\/paulozoom.com","name":"Paulo Pereira","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","notifications":false,"profile_background_tile":false,"favourites_count":7,"profile_text_color":"000000","screen_name":"paulozoom","statuses_count":2365,"profile_link_color":"ff0007","location":"Porto, Portugal","id":14452237,"created_at":"Sun Apr 20 15:11:38 +0000 2008","profile_sidebar_fill_color":"f7f7f7"},"text":"@jnunemaker Trying to dominate the world, heh?","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":1438613754,"id":1438634711,"in_reply_to_user_id":4243,"source":"<a href=\"http:\/\/thecosmicmachine.com\/eventbox\/\">EventBox<\/a>","created_at":"Thu Apr 02 14:37:38 +0000 2009"},{"in_reply_to_screen_name":"jnunemaker","user":{"description":"me.awesomize()","time_zone":"Eastern Time (US & Canada)","utc_offset":-18000,"profile_sidebar_border_color":"87bc44","notifications":true,"profile_background_tile":false,"friends_count":24,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/51681870\/kebabdylan-32_normal.jpg","following":true,"favourites_count":0,"profile_background_color":"9ae4e8","url":null,"screen_name":"kebabdylan","name":"Jonathan","statuses_count":98,"protected":false,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_text_color":"000000","created_at":"Tue Mar 11 12:45:25 +0000 2008","profile_link_color":"0000ff","location":"","id":14122477,"profile_sidebar_fill_color":"e0ff92","followers_count":21},"text":"@jnunemaker la e today?","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":4243,"created_at":"Thu Apr 02 14:34:55 +0000 2009","favorited":false,"id":1438618345,"source":"<a href=\"http:\/\/iconfactory.com\/software\/twitterrific\">twitterrific<\/a>"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_background_images\/4652948\/willie_grovey_collage.jpg","friends_count":717,"description":"Raccoon Willie is the most celebrated animal on the web... he's bigger than Shrek!!!","utc_offset":-25200,"profile_background_color":"9AE4E8","following":true,"time_zone":"Mountain Time (US & Canada)","profile_text_color":"333333","followers_count":371,"url":"http:\/\/www.youtube.com\/damygeebo","name":"Raccoon Willie","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/71327390\/wilcat_normal.jpg","notifications":false,"profile_background_tile":true,"favourites_count":0,"profile_link_color":"c81614","screen_name":"damygeebo","statuses_count":1401,"profile_sidebar_fill_color":"ebe3bc","location":"Midwest","id":19037300,"created_at":"Thu Jan 15 20:26:20 +0000 2009","profile_sidebar_border_color":"d0ba86"},"text":"@jnunemaker ...have you read \"Raccoon Willie: Dead Man\" yet?","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":1436286949,"id":1436292726,"in_reply_to_user_id":4243,"source":"web","created_at":"Thu Apr 02 03:53:16 +0000 2009"},{"in_reply_to_screen_name":"jnunemaker","user":{"notifications":false,"profile_background_tile":false,"friends_count":177,"description":"don't judge me by my crappy website","time_zone":"Pacific Time (US & Canada)","utc_offset":-28800,"favourites_count":18,"profile_background_color":"98AA5F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_text_color":"000000","url":"http:\/\/screenflicker.com\/mike\/","screen_name":"stickel","name":"Mike Stickel","statuses_count":6951,"protected":false,"profile_link_color":"0000ff","created_at":"Wed Nov 22 15:38:28 +0000 2006","profile_sidebar_fill_color":"FFF591","location":"San Francisco","id":15403,"profile_sidebar_border_color":"BCA944","followers_count":529},"text":"@jnunemaker Ouch. That sucks. I rode bitch know a sport bike but that was before I knew how to ride (that person taught me a bit).","truncated":false,"in_reply_to_status_id":1435431849,"in_reply_to_user_id":4243,"created_at":"Thu Apr 02 03:20:20 +0000 2009","favorited":false,"id":1436127953,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>"},{"in_reply_to_screen_name":"jnunemaker","user":{"notifications":false,"description":"Rails Machine CEO, DJ, Bird dog enthusiast","time_zone":"Eastern Time (US & Canada)","utc_offset":-18000,"profile_sidebar_border_color":"87bc44","profile_background_tile":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56157945\/Photo_1_normal.jpg","following":true,"friends_count":104,"profile_background_color":"9ae4e8","url":"http:\/\/bradley.is","screen_name":"bradleyktaylor","name":"Bradley Taylor","protected":false,"favourites_count":0,"profile_text_color":"000000","created_at":"Thu Feb 21 18:50:49 +0000 2008","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_link_color":"0000ff","followers_count":142,"location":"Savannah, GA","id":13782402,"statuses_count":793,"profile_sidebar_fill_color":"e0ff92"},"text":"@jnunemaker thanks for the heads up. I'm mostly just using email as an api.","truncated":false,"in_reply_to_status_id":1435440065,"in_reply_to_user_id":4243,"created_at":"Thu Apr 02 01:18:18 +0000 2009","favorited":false,"id":1435461339,"source":"web"},{"favorited":false,"user":{"profile_sidebar_fill_color":"e0ff92","description":"http:\/\/iphoneonrails.com","utc_offset":-18000,"profile_sidebar_border_color":"87bc44","followers_count":287,"following":true,"notifications":false,"profile_background_tile":false,"friends_count":32,"time_zone":"Eastern Time (US & Canada)","url":"http:\/\/yfactorial.com","name":"Ryan Daigle","favourites_count":1,"profile_background_color":"9ae4e8","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/45111492\/ryan_vector_normal.png","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_text_color":"000000","screen_name":"rwdaigle","statuses_count":529,"profile_link_color":"0000ff","location":"iPhone: 35.778992,-78.842484","id":658343,"created_at":"Thu Jan 18 02:46:57 +0000 2007"},"text":"@jnunemaker don't do it man. Step away from the bike.","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":1434842036,"id":1435366505,"in_reply_to_user_id":4243,"source":"<a href=\"http:\/\/iconfactory.com\/software\/twitterrific\">twitterrific<\/a>","created_at":"Thu Apr 02 01:00:55 +0000 2009"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","friends_count":177,"description":"don't judge me by my crappy website","utc_offset":-28800,"profile_background_color":"98AA5F","following":true,"time_zone":"Pacific Time (US & Canada)","profile_text_color":"000000","followers_count":527,"url":"http:\/\/screenflicker.com\/mike\/","name":"Mike Stickel","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":18,"profile_link_color":"0000ff","screen_name":"stickel","statuses_count":6949,"profile_sidebar_fill_color":"FFF591","location":"San Francisco","id":15403,"created_at":"Wed Nov 22 15:38:28 +0000 2006","profile_sidebar_border_color":"BCA944"},"text":"@jnunemaker No? Why not? And which part wouldn't you wish on anyone?","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":null,"id":1435238296,"in_reply_to_user_id":4243,"source":"<a href=\"http:\/\/iconfactory.com\/software\/twitterrific\">twitterrific<\/a>","created_at":"Thu Apr 02 00:36:48 +0000 2009"},{"favorited":false,"user":{"profile_sidebar_fill_color":"FFF591","description":"don't judge me by my crappy website","utc_offset":-28800,"profile_sidebar_border_color":"BCA944","followers_count":527,"following":true,"notifications":false,"profile_background_tile":false,"friends_count":177,"time_zone":"Pacific Time (US & Canada)","url":"http:\/\/screenflicker.com\/mike\/","name":"Mike Stickel","favourites_count":18,"profile_background_color":"98AA5F","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_text_color":"000000","screen_name":"stickel","statuses_count":6944,"profile_link_color":"0000ff","location":"San Francisco","id":15403,"created_at":"Wed Nov 22 15:38:28 +0000 2006"},"text":"@jnunemaker And they'd all cheer and buy us drinks the entire time we are there. It will be AWESOME! @orderedlist can ride bitch. :)","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":null,"id":1435063394,"in_reply_to_user_id":4243,"source":"<a href=\"http:\/\/iconfactory.com\/software\/twitterrific\">twitterrific<\/a>","created_at":"Wed Apr 01 23:58:39 +0000 2009"},{"in_reply_to_screen_name":"jnunemaker","user":{"description":"don't judge me by my crappy website","time_zone":"Pacific Time (US & Canada)","utc_offset":-28800,"profile_background_color":"98AA5F","followers_count":527,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","following":true,"notifications":false,"profile_background_tile":false,"favourites_count":18,"profile_text_color":"000000","url":"http:\/\/screenflicker.com\/mike\/","screen_name":"stickel","name":"Mike Stickel","statuses_count":6943,"profile_link_color":"0000ff","protected":false,"created_at":"Wed Nov 22 15:38:28 +0000 2006","profile_sidebar_fill_color":"FFF591","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","friends_count":177,"profile_sidebar_border_color":"BCA944","location":"San Francisco","id":15403},"text":"@jnunemaker I dunno. The V-ROD Muscle is pretty hot. http:\/\/moourl.com\/p0q99","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":4243,"created_at":"Wed Apr 01 23:36:31 +0000 2009","favorited":false,"id":1434948902,"source":"<a href=\"http:\/\/iconfactory.com\/software\/twitterrific\">twitterrific<\/a>"},{"truncated":false,"user":{"description":"don't judge me by my crappy website","url":"http:\/\/screenflicker.com\/mike\/","name":"Mike Stickel","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","location":"San Francisco","id":15403,"followers_count":527,"screen_name":"stickel"},"in_reply_to_status_id":null,"text":"@jnunemaker Johnny should get a Harley. :D Then ride it to Sturgis with me one of these years. :)","in_reply_to_user_id":4243,"favorited":false,"created_at":"Wed Apr 01 22:51:20 +0000 2009","in_reply_to_screen_name":"jnunemaker","id":1434706104,"source":"<a href=\"http:\/\/iconfactory.com\/software\/twitterrific\">twitterrific<\/a>"},{"in_reply_to_user_id":4243,"user":{"description":"Researcher - eLearning and machine consciousness, community and identity","url":"http:\/\/brains.parslow.net","name":"PatParslow","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/53254225\/pat_normal.jpg","protected":false,"followers_count":292,"screen_name":"PatParslow","location":"Reading, UK","id":14512018},"text":"@jnunemaker http:\/\/twitter.rubyforge.org\/ down?","favorited":false,"created_at":"Wed Apr 01 20:22:38 +0000 2009","in_reply_to_screen_name":"jnunemaker","truncated":false,"id":1433804708,"in_reply_to_status_id":null,"source":"<a href=\"http:\/\/www.tweetdeck.com\/\">TweetDeck<\/a>"},{"truncated":false,"user":{"description":"Web guy in the making. Design, coding, usability. Typography addict.","url":"http:\/\/paulozoom.com","name":"Paulo Pereira","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","location":"Porto, Portugal","id":14452237,"followers_count":349,"screen_name":"paulozoom"},"in_reply_to_status_id":null,"text":"@jnunemaker found the problem, it was an unset variable. sry","in_reply_to_user_id":4243,"favorited":false,"created_at":"Wed Apr 01 13:15:06 +0000 2009","in_reply_to_screen_name":"jnunemaker","id":1431202286,"source":"<a href=\"http:\/\/thecosmicmachine.com\/eventbox\/\">EventBox<\/a>"},{"in_reply_to_user_id":4243,"user":{"description":"Web guy in the making. Design, coding, usability. Typography addict.","url":"http:\/\/paulozoom.com","name":"Paulo Pereira","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","protected":false,"followers_count":349,"screen_name":"paulozoom","location":"Porto, Portugal","id":14452237},"text":"@jnunemaker tks a lot for your feedback. also, can u check what's going on with httparty? doesn't work at all. http:\/\/bit.ly\/RTR5","favorited":false,"created_at":"Wed Apr 01 13:04:46 +0000 2009","in_reply_to_screen_name":"jnunemaker","truncated":false,"id":1431150482,"in_reply_to_status_id":1430926191,"source":"<a href=\"http:\/\/thecosmicmachine.com\/eventbox\/\">EventBox<\/a>"},{"in_reply_to_user_id":4243,"user":{"description":"Web developer for the University of Notre Dame","url":"http:\/\/weedygarden.net","name":"Erik Runyon","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/43767822\/Photo_5_normal.jpg","protected":false,"followers_count":65,"screen_name":"erunyon","location":"Michiana","id":9241962},"text":"@jnunemaker I think the Lions are looking at him... which is funny since they already have 5 or so QB's","favorited":false,"created_at":"Wed Apr 01 12:39:20 +0000 2009","in_reply_to_screen_name":"jnunemaker","truncated":false,"id":1431028594,"in_reply_to_status_id":1431011290,"source":"<a href=\"http:\/\/iconfactory.com\/software\/twitterrific\">twitterrific<\/a>"},{"truncated":false,"user":{"description":"Web guy in the making. Design, coding, usability. Typography addict.","url":"http:\/\/paulozoom.com","name":"Paulo Pereira","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","location":"Porto, Portugal","id":14452237,"followers_count":348,"screen_name":"paulozoom"},"in_reply_to_status_id":null,"text":"@jnunemaker I've never tested any code, and I'm considering Rspec and Shoulda for both rails and non-rails code. Which one do you suggest?","in_reply_to_user_id":4243,"favorited":false,"created_at":"Wed Apr 01 10:49:02 +0000 2009","in_reply_to_screen_name":"jnunemaker","id":1430619438,"source":"<a href=\"http:\/\/thecosmicmachine.com\/eventbox\/\">EventBox<\/a>"},{"in_reply_to_user_id":4243,"user":{"description":"Twenty-something physician, entrepreneur, biker, on Rails, et cetera.","url":"http:\/\/y.freshpursuits.com\/","name":"Yasser Dahab","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/65001080\/feet_normal.png","protected":false,"followers_count":191,"screen_name":"yasserdahab","location":"Denver","id":728893},"text":"@jnunemaker you are my hero.","favorited":false,"created_at":"Wed Apr 01 05:34:36 +0000 2009","in_reply_to_screen_name":"jnunemaker","truncated":false,"id":1429670006,"in_reply_to_status_id":1429401587,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>"}]
|
@@ -0,0 +1 @@
|
|
1
|
+
{"results":[{"text":"Someone asked about a tweet reader. Easy to do in ruby with @jnunemaker's twitter gem and the win32-sapi gem, if you are on windows.","to_user_id":null,"from_user":"PatParslow","id":1446425395,"from_user_id":297147,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/53254225\/pat_normal.jpg","created_at":"Fri, 03 Apr 2009 16:55:40 +0000"},{"text":"@jnunemaker cold out today. cold yesterday. even colder today.","to_user_id":19106,"to_user":"jnunemaker","from_user":"oaknd1","id":1446039519,"from_user_id":112472,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/101535873\/avatarone_normal.png","created_at":"Fri, 03 Apr 2009 15:51:12 +0000"},{"text":"@jnunemaker could you try to do HTTParty.get("http:\/\/digg.com") ? I find myself waiting forever for the response. Posted a ticket on that.","to_user_id":19106,"to_user":"jnunemaker","from_user":"paulozoom","id":1445973779,"from_user_id":258387,"iso_language_code":"en","source":"<a href="http:\/\/thecosmicmachine.com\/eventbox\/">EventBox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","created_at":"Fri, 03 Apr 2009 15:40:20 +0000"},{"text":"Crack, @jnunemaker's new gem for XML and JSON parsing, is aptly named. One hit and I know it will be hard to quit.","to_user_id":null,"from_user":"jerry","id":1442399154,"from_user_id":78336,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/54424361\/jerry135x135_normal.jpg","created_at":"Fri, 03 Apr 2009 01:27:02 +0000"},{"text":"@jnunemaker An unobtrusive Fancy Zoom image behavior for use with LowPro: http:\/\/gist.github.com\/89299","to_user_id":19106,"to_user":"jnunemaker","from_user":"johnwlong2000","id":1439627059,"from_user_id":445276,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/66571046\/john7_normal.jpg","created_at":"Thu, 02 Apr 2009 17:23:21 +0000"},{"text":"@jnunemaker Trying to dominate the world, heh?","to_user_id":19106,"to_user":"jnunemaker","from_user":"paulozoom","id":1438634711,"from_user_id":258387,"iso_language_code":"en","source":"<a href="http:\/\/thecosmicmachine.com\/eventbox\/">EventBox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","created_at":"Thu, 02 Apr 2009 14:37:38 +0000"},{"text":"@jnunemaker la e today?","to_user_id":19106,"to_user":"jnunemaker","from_user":"kebabdylan","id":1438618345,"from_user_id":162717,"iso_language_code":"es","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/51681870\/kebabdylan-32_normal.jpg","created_at":"Thu, 02 Apr 2009 14:34:55 +0000"},{"text":"@jnunemaker ...have you read "Raccoon Willie: Dead Man" yet?","to_user_id":19106,"to_user":"jnunemaker","from_user":"damygeebo","id":1436292726,"from_user_id":3653781,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/71327390\/wilcat_normal.jpg","created_at":"Thu, 02 Apr 2009 03:53:16 +0000"},{"text":"@jnunemaker Ouch. That sucks. I rode bitch know a sport bike but that was before I knew how to ride (that person taught me a bit).","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1436127953,"from_user_id":2132320,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Thu, 02 Apr 2009 03:20:20 +0000"},{"text":"@jnunemaker thanks for the heads up. I'm mostly just using email as an api.","to_user_id":19106,"to_user":"jnunemaker","from_user":"bradleyktaylor","id":1435461339,"from_user_id":49333,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56157945\/Photo_1_normal.jpg","created_at":"Thu, 02 Apr 2009 01:18:18 +0000"},{"text":"@jnunemaker don't do it man. Step away from the bike.","to_user_id":19106,"to_user":"jnunemaker","from_user":"rwdaigle","id":1435366505,"from_user_id":153214,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/45111492\/ryan_vector_normal.png","created_at":"Thu, 02 Apr 2009 01:00:55 +0000"},{"text":"@jnunemaker No? Why not? And which part wouldn't you wish on anyone?","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1435238296,"from_user_id":2132320,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Thu, 02 Apr 2009 00:36:48 +0000"},{"text":"@jnunemaker And they'd all cheer and buy us drinks the entire time we are there. It will be AWESOME! @orderedlist can ride bitch. :)","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1435063394,"from_user_id":2132320,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Wed, 01 Apr 2009 23:58:39 +0000"},{"text":"@jnunemaker I dunno. The V-ROD Muscle is pretty hot. http:\/\/moourl.com\/p0q99","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1434948902,"from_user_id":2132320,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Wed, 01 Apr 2009 23:36:31 +0000"},{"text":"@jnunemaker Johnny should get a Harley. :D Then ride it to Sturgis with me one of these years. :)","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1434706104,"from_user_id":2132320,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Wed, 01 Apr 2009 22:51:20 +0000"}],"since_id":0,"max_id":1446791544,"refresh_url":"?since_id=1446791544&q=%40jnunemaker","results_per_page":15,"next_page":"?page=2&max_id=1446791544&q=%40jnunemaker","completed_in":0.023961,"page":1,"query":"%40jnunemaker"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"results":[{"text":"Colder out today than expected. Headed to the Beanery for some morning wakeup drink. Latte or coffee...hmmm...","to_user_id":null,"from_user":"jnunemaker","id":1445986256,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Fri, 03 Apr 2009 15:42:24 +0000"},{"text":"@jerry haha. @erunyon said he didn't think it was unique enough for google searches. :)","to_user_id":78336,"to_user":"jerry","from_user":"jnunemaker","id":1443087283,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Fri, 03 Apr 2009 03:34:26 +0000"},{"text":"Rob Dyrdek is the funniest man alive. That is all.","to_user_id":null,"from_user":"jnunemaker","id":1441588944,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 22:57:00 +0000"},{"text":"Dang, forgot about CAN http:\/\/calendaraboutnothing.com\/~jnunemaker yesterday and broke my streak of 5 days in a row.","to_user_id":null,"from_user":"jnunemaker","id":1438916463,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 15:24:17 +0000"},{"text":"@bryckbost yep. I haven't used dash much but it seems cool. Give it a try.","to_user_id":12964,"to_user":"bryckbost","from_user":"jnunemaker","id":1438754546,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 14:57:49 +0000"},{"text":"@nateklaiber dive into python is free online.","to_user_id":128782,"to_user":"nateklaiber","from_user":"jnunemaker","id":1438718326,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 14:51:47 +0000"},{"text":"@kebabsylan yes. I'll be there at noon.","to_user_id":9689026,"to_user":"kebabsylan","from_user":"jnunemaker","id":1438637063,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/help.twitter.com\/index.php?pg=kb.page&id=75">txt<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 14:38:03 +0000"},{"text":"http:\/\/twitpic.com\/2pwjy - The books I'm reading right now. Wish I had more time.","to_user_id":null,"from_user":"jnunemaker","id":1438613754,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/twitpic.com\/">TwitPic<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 14:34:10 +0000"},{"text":"Reading a couple hokey named books of late, but really enjoying them. "I Will Teach You To Be Rich" and "Get Anyone To Do Anything".","to_user_id":null,"from_user":"jnunemaker","id":1436286949,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 03:52:02 +0000"},{"text":"Megan Joy turned into a train wreck tonight.","to_user_id":null,"from_user":"jnunemaker","id":1435963959,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/help.twitter.com\/index.php?pg=kb.page&id=75">txt<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 02:51:01 +0000"},{"text":"Watching latest House. Cool idea.","to_user_id":null,"from_user":"jnunemaker","id":1435502494,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 01:25:46 +0000"},{"text":"@rwdaigle not a motorcycle man?","to_user_id":153214,"to_user":"rwdaigle","from_user":"jnunemaker","id":1435443029,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 01:14:52 +0000"},{"text":"@bradleyktaylor I did some ruby wufoo a few months back. It's on github.","to_user_id":49333,"to_user":"bradleyktaylor","from_user":"jnunemaker","id":1435440065,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 01:14:19 +0000"},{"text":"@stickel riding bitch on motorcycle. Bike died once on trip and had to ride on back of my dad's.","to_user_id":2132320,"to_user":"stickel","from_user":"jnunemaker","id":1435431849,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 01:12:46 +0000"},{"text":"@stickel haha. Having done that twice I wouldn't wish it on anyone. :)","to_user_id":2132320,"to_user":"stickel","from_user":"jnunemaker","id":1435217155,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 00:31:52 +0000"}],"since_id":0,"max_id":1446791544,"refresh_url":"?since_id=1446791544&q=from%3Ajnunemaker","results_per_page":15,"next_page":"?page=2&max_id=1446791544&q=from%3Ajnunemaker","completed_in":0.024906,"page":1,"query":"from%3Ajnunemaker"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"in_reply_to_screen_name":null,"user":{"profile_sidebar_border_color":"181A1E","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"friends_count":161,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"notifications":false,"profile_background_color":"1A1B1F","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","profile_background_tile":false,"profile_text_color":"666666","followers_count":1231,"protected":false,"favourites_count":73,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_link_color":"2FC2EF","statuses_count":4664,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif"},"text":"Rob Dyrdek is the funniest man alive. That is all.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 22:57:00 +0000 2009","favorited":false,"id":1441588944,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"in_reply_to_screen_name":null,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"friends_count":161,"profile_sidebar_border_color":"181A1E","following":false,"favourites_count":80,"notifications":false,"profile_background_color":"1A1B1F","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","statuses_count":4771,"protected":false,"profile_background_tile":false,"profile_text_color":"666666","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","screen_name":"jnunemaker","id":4243,"profile_sidebar_fill_color":"252429","followers_count":1252},"text":"Eating some oatmeal and butterscotch cookies with a cold glass of milk for breakfast. Tasty!","truncated":false,"in_reply_to_status_id":null,"created_at":"Thu Apr 16 14:12:36 +0000 2009","in_reply_to_user_id":null,"id":1533815199,"favorited":false,"source":"<a href=\"http:\/\/twitter.rubyforge.org\">Twitter App<\/a>"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"profile_background_tile":false,"friends_count":159,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"notifications":null,"favourites_count":79,"profile_background_color":"1A1B1F","following":null,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","statuses_count":4752,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","time_zone":"Indiana (East)","protected":false,"screen_name":"jnunemaker","status":{"in_reply_to_status_id":null,"in_reply_to_user_id":null,"text":"224! http:\/\/flightcontrolled.com\/ Holy crap. There are some really high flight control scorers out there. *gives up* :D","favorited":false,"in_reply_to_screen_name":null,"created_at":"Tue Apr 14 20:38:49 +0000 2009","truncated":false,"id":1519558635,"source":"<a href=\"http:\/\/twitter.rubyforge.org\">Twitter App<\/a>"},"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","followers_count":1248,"location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"in_reply_to_screen_name":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","notifications":false,"profile_background_tile":false,"friends_count":160,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"favourites_count":74,"profile_background_color":"1A1B1F","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4666,"protected":false,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_fill_color":"252429","followers_count":1234},"text":"Colder out today than expected. Headed to the Beanery for some morning wakeup drink. Latte or coffee...hmmm...","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 15:42:24 +0000 2009","favorited":false,"id":1445986256,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>"},{"in_reply_to_screen_name":"jerry","user":{"notifications":false,"profile_background_tile":false,"friends_count":160,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":73,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4665,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1231},"text":"@jerry haha. @erunyon said he didn't think it was unique enough for google searches. :)","truncated":false,"in_reply_to_status_id":1442399154,"in_reply_to_user_id":613,"created_at":"Fri Apr 03 03:34:26 +0000 2009","favorited":false,"id":1443087283,"source":"web"},{"in_reply_to_screen_name":null,"user":{"profile_sidebar_border_color":"181A1E","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"friends_count":161,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"notifications":false,"profile_background_color":"1A1B1F","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","profile_background_tile":false,"profile_text_color":"666666","followers_count":1231,"protected":false,"favourites_count":73,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_link_color":"2FC2EF","statuses_count":4664,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif"},"text":"Rob Dyrdek is the funniest man alive. That is all.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 22:57:00 +0000 2009","favorited":false,"id":1441588944,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>"},{"favorited":false,"user":{"profile_sidebar_fill_color":"252429","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","followers_count":1228,"following":true,"notifications":false,"profile_background_tile":false,"friends_count":161,"time_zone":"Indiana (East)","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","favourites_count":73,"profile_background_color":"1A1B1F","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","screen_name":"jnunemaker","statuses_count":4663,"profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"Dang, forgot about CAN http:\/\/calendaraboutnothing.com\/~jnunemaker yesterday and broke my streak of 5 days in a row.","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1438916463,"in_reply_to_user_id":null,"source":"web","created_at":"Thu Apr 02 15:24:17 +0000 2009"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_background_color":"1A1B1F","following":true,"time_zone":"Indiana (East)","profile_text_color":"666666","followers_count":1228,"url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":73,"profile_link_color":"2FC2EF","screen_name":"jnunemaker","statuses_count":4662,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_border_color":"181A1E"},"text":"@bryckbost yep. I haven't used dash much but it seems cool. Give it a try.","in_reply_to_screen_name":"bryckbost","truncated":false,"in_reply_to_status_id":1438082787,"id":1438754546,"in_reply_to_user_id":8494682,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>","created_at":"Thu Apr 02 14:57:49 +0000 2009"},{"favorited":false,"user":{"profile_sidebar_fill_color":"252429","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","followers_count":1228,"following":true,"notifications":false,"profile_background_tile":false,"friends_count":161,"time_zone":"Indiana (East)","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","favourites_count":73,"profile_background_color":"1A1B1F","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","screen_name":"jnunemaker","statuses_count":4661,"profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"@nateklaiber dive into python is free online.","in_reply_to_screen_name":"nateklaiber","truncated":false,"in_reply_to_status_id":1438415604,"id":1438718326,"in_reply_to_user_id":13722,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>","created_at":"Thu Apr 02 14:51:47 +0000 2009"},{"in_reply_to_screen_name":null,"user":{"friends_count":161,"profile_background_color":"1A1B1F","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_text_color":"666666","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_link_color":"2FC2EF","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","protected":false,"statuses_count":4660,"profile_sidebar_fill_color":"252429","notifications":false,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_border_color":"181A1E","followers_count":1228,"profile_background_tile":false,"location":"Mishawaka, Indiana","id":4243},"text":"@kebabsylan yes. I'll be there at noon.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 14:38:03 +0000 2009","favorited":false,"id":1438637063,"source":"<a href=\"http:\/\/help.twitter.com\/index.php?pg=kb.page&id=75\">txt<\/a>"},{"in_reply_to_screen_name":null,"user":{"notifications":false,"profile_background_tile":false,"friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4659,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1228},"text":"http:\/\/twitpic.com\/2pwjy - The books I'm reading right now. Wish I had more time.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 14:34:10 +0000 2009","favorited":false,"id":1438613754,"source":"<a href=\"http:\/\/twitpic.com\/\">TwitPic<\/a>"},{"favorited":false,"user":{"statuses_count":4658,"profile_background_color":"1A1B1F","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"followers_count":1226,"profile_text_color":"666666","following":true,"favourites_count":72,"time_zone":"Indiana (East)","profile_link_color":"2FC2EF","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_sidebar_fill_color":"252429","friends_count":161,"screen_name":"jnunemaker","profile_sidebar_border_color":"181A1E","profile_background_tile":false,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"Reading a couple hokey named books of late, but really enjoying them. \"I Will Teach You To Be Rich\" and \"Get Anyone To Do Anything\".","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1436286949,"in_reply_to_user_id":null,"source":"web","created_at":"Thu Apr 02 03:52:02 +0000 2009"},{"favorited":false,"user":{"profile_link_color":"2FC2EF","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_fill_color":"252429","followers_count":1226,"following":true,"time_zone":"Indiana (East)","profile_sidebar_border_color":"181A1E","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","notifications":false,"profile_background_tile":false,"friends_count":161,"protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","favourites_count":72,"profile_background_color":"1A1B1F","screen_name":"jnunemaker","statuses_count":4657,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"Megan Joy turned into a train wreck tonight.","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1435963959,"in_reply_to_user_id":null,"source":"<a href=\"http:\/\/help.twitter.com\/index.php?pg=kb.page&id=75\">txt<\/a>","created_at":"Thu Apr 02 02:51:01 +0000 2009"},{"in_reply_to_screen_name":null,"user":{"notifications":false,"profile_background_tile":false,"friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4656,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1226},"text":"Watching latest House. Cool idea.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 01:25:46 +0000 2009","favorited":false,"id":1435502494,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","following":true,"time_zone":"Indiana (East)","profile_background_color":"1A1B1F","followers_count":1226,"url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":72,"profile_text_color":"666666","screen_name":"jnunemaker","statuses_count":4655,"profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429"},"text":"@rwdaigle not a motorcycle man?","in_reply_to_screen_name":"rwdaigle","truncated":false,"in_reply_to_status_id":1435366505,"id":1435443029,"in_reply_to_user_id":658343,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>","created_at":"Thu Apr 02 01:14:52 +0000 2009"},{"favorited":false,"user":{"profile_sidebar_border_color":"181A1E","followers_count":1226,"description":"Loves his wife, ruby, notre dame football and iu basketball","profile_background_tile":false,"utc_offset":-18000,"following":true,"friends_count":161,"profile_background_color":"1A1B1F","time_zone":"Indiana (East)","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","favourites_count":72,"profile_text_color":"666666","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_link_color":"2FC2EF","screen_name":"jnunemaker","statuses_count":4654,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"notifications":false,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"@bradleyktaylor I did some ruby wufoo a few months back. It's on github.","in_reply_to_screen_name":"bradleyktaylor","truncated":false,"in_reply_to_status_id":1435320189,"id":1435440065,"in_reply_to_user_id":13782402,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>","created_at":"Thu Apr 02 01:14:19 +0000 2009"},{"in_reply_to_screen_name":"stickel","user":{"notifications":true,"profile_background_tile":false,"friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4653,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1226},"text":"@stickel riding bitch on motorcycle. Bike died once on trip and had to ride on back of my dad's.","truncated":false,"in_reply_to_status_id":1435238296,"in_reply_to_user_id":15403,"created_at":"Thu Apr 02 01:12:46 +0000 2009","favorited":false,"id":1435431849,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>"},{"in_reply_to_screen_name":"stickel","user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"profile_background_color":"1A1B1F","followers_count":1226,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"notifications":true,"profile_background_tile":false,"favourites_count":72,"profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4652,"profile_link_color":"2FC2EF","protected":false,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":161,"profile_sidebar_border_color":"181A1E","location":"Mishawaka, Indiana","id":4243},"text":"@stickel haha. Having done that twice I wouldn't wish it on anyone. :)","truncated":false,"in_reply_to_status_id":1435063394,"in_reply_to_user_id":15403,"created_at":"Thu Apr 02 00:31:52 +0000 2009","favorited":false,"id":1435217155,"source":"<a href=\"http:\/\/www.atebits.com\/software\/tweetie\/\">Tweetie<\/a>"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","following":true,"time_zone":"Indiana (East)","profile_background_color":"1A1B1F","followers_count":1225,"url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":72,"profile_text_color":"666666","screen_name":"jnunemaker","statuses_count":4651,"profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429"},"text":"@stickel Dude. We would roll in and be like \"LISTEN UP! WE ARE WEB DEVELOPERS!\" Heads would turn.","in_reply_to_screen_name":"stickel","truncated":false,"in_reply_to_status_id":1434706104,"id":1434998057,"in_reply_to_user_id":15403,"source":"web","created_at":"Wed Apr 01 23:46:00 +0000 2009"},{"in_reply_to_screen_name":null,"user":{"notifications":false,"profile_background_tile":false,"friends_count":179,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4650,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1226},"text":"Sat on a fat bob today. Want! http:\/\/tr.im\/i7ha Love the flat black. Wish I could get a used one for less money, but they are too new.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Wed Apr 01 23:16:13 +0000 2009","favorited":false,"id":1434842036,"source":"web"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":179,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_background_color":"1A1B1F","following":true,"time_zone":"Indiana (East)","profile_text_color":"666666","followers_count":1226,"url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":72,"profile_link_color":"2FC2EF","screen_name":"jnunemaker","statuses_count":4649,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_border_color":"181A1E"},"text":"@Carrie I agree with @orderedlist. Taco Bell is better than Hacienda.","in_reply_to_screen_name":"Carrie","truncated":false,"in_reply_to_status_id":1434732331,"id":1434741725,"in_reply_to_user_id":15323,"source":"<a href=\"http:\/\/loungeapp.com\">Lounge<\/a>","created_at":"Wed Apr 01 22:57:45 +0000 2009"},{"truncated":false,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","location":"Mishawaka, Indiana","id":4243,"followers_count":1226,"screen_name":"jnunemaker"},"in_reply_to_status_id":null,"text":"Just test drove an Escape with @nunieswife and visited the Harley Store. Johnny want a Harley...BAD!","in_reply_to_user_id":null,"favorited":false,"created_at":"Wed Apr 01 22:31:04 +0000 2009","in_reply_to_screen_name":null,"id":1434591491,"source":"web"},{"truncated":false,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","location":"Mishawaka, Indiana","id":4243,"followers_count":1222,"screen_name":"jnunemaker"},"in_reply_to_status_id":1431726310,"text":"@acornoAk Consider yourself unfollowed for that prank.","in_reply_to_user_id":18173702,"favorited":false,"created_at":"Wed Apr 01 14:52:45 +0000 2009","in_reply_to_screen_name":"acornoAk","id":1431763938,"source":"web"}]
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'shoulda'
|
4
|
+
require 'matchy'
|
5
|
+
require 'mocha'
|
6
|
+
require 'fakeweb'
|
7
|
+
|
8
|
+
FakeWeb.allow_net_connect = false
|
9
|
+
|
10
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
11
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
12
|
+
require 'twitter'
|
13
|
+
|
14
|
+
class Test::Unit::TestCase
|
15
|
+
end
|
16
|
+
|
17
|
+
def fixture_file(filename)
|
18
|
+
return '' if filename == ''
|
19
|
+
file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
|
20
|
+
File.read(file_path)
|
21
|
+
end
|
22
|
+
|
23
|
+
def twitter_url(url)
|
24
|
+
url =~ /^http/ ? url : "http://twitter.com:80#{url}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def stub_get(url, filename, status=nil)
|
28
|
+
options = {:string => fixture_file(filename)}
|
29
|
+
options.merge!({:status => status}) unless status.nil?
|
30
|
+
|
31
|
+
FakeWeb.register_uri(:get, twitter_url(url), options)
|
32
|
+
end
|
33
|
+
|
34
|
+
def stub_post(url, filename)
|
35
|
+
FakeWeb.register_uri(:post, twitter_url(url), :string => fixture_file(filename))
|
36
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class BaseTest < Test::Unit::TestCase
|
4
|
+
context "base" do
|
5
|
+
setup do
|
6
|
+
oauth = Twitter::OAuth.new('token', 'secret')
|
7
|
+
@access_token = OAuth::AccessToken.new(oauth.consumer, 'atoken', 'asecret')
|
8
|
+
oauth.stubs(:access_token).returns(@access_token)
|
9
|
+
@twitter = Twitter::Base.new(oauth)
|
10
|
+
end
|
11
|
+
|
12
|
+
context "initialize" do
|
13
|
+
should "require a client" do
|
14
|
+
@twitter.client.should respond_to(:get)
|
15
|
+
@twitter.client.should respond_to(:post)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
should "delegate get to the client" do
|
20
|
+
@access_token.expects(:get).with('/foo').returns(nil)
|
21
|
+
@twitter.get('/foo')
|
22
|
+
end
|
23
|
+
|
24
|
+
should "delegate post to the client" do
|
25
|
+
@access_token.expects(:post).with('/foo', {:bar => 'baz'}).returns(nil)
|
26
|
+
@twitter.post('/foo', {:bar => 'baz'})
|
27
|
+
end
|
28
|
+
|
29
|
+
context "hitting the api" do
|
30
|
+
should "be able to get friends timeline" do
|
31
|
+
stub_get('/statuses/friends_timeline.json', 'friends_timeline.json')
|
32
|
+
timeline = @twitter.friends_timeline
|
33
|
+
timeline.size.should == 20
|
34
|
+
first = timeline.first
|
35
|
+
first.source.should == '<a href="http://www.atebits.com/software/tweetie/">Tweetie</a>'
|
36
|
+
first.user.name.should == 'John Nunemaker'
|
37
|
+
first.user.url.should == 'http://railstips.org/about'
|
38
|
+
first.id.should == 1441588944
|
39
|
+
first.favorited.should be(false)
|
40
|
+
end
|
41
|
+
|
42
|
+
should "be able to get user timeline" do
|
43
|
+
stub_get('/statuses/user_timeline.json', 'user_timeline.json')
|
44
|
+
timeline = @twitter.user_timeline
|
45
|
+
timeline.size.should == 20
|
46
|
+
first = timeline.first
|
47
|
+
first.text.should == 'Colder out today than expected. Headed to the Beanery for some morning wakeup drink. Latte or coffee...hmmm...'
|
48
|
+
first.user.name.should == 'John Nunemaker'
|
49
|
+
end
|
50
|
+
|
51
|
+
should "be able to get a status" do
|
52
|
+
stub_get('/statuses/show/1441588944.json', 'status.json')
|
53
|
+
status = @twitter.status(1441588944)
|
54
|
+
status.user.name.should == 'John Nunemaker'
|
55
|
+
status.id.should == 1441588944
|
56
|
+
end
|
57
|
+
|
58
|
+
should "be able to handle a status ending in a backslash" do
|
59
|
+
stub_get('/statuses/show/1441588944.json', 'backslash_status.json')
|
60
|
+
status = @twitter.status(1441588944)
|
61
|
+
status.user.name.should == 'John Nunemaker'
|
62
|
+
status.text.should == "Rob Dyrdek is the funniest man alive. That is all.\\"
|
63
|
+
status.id.should == 1441588944
|
64
|
+
end
|
65
|
+
|
66
|
+
should "be able to update status" do
|
67
|
+
stub_post('/statuses/update.json', 'status.json')
|
68
|
+
status = @twitter.update('Rob Dyrdek is the funniest man alive. That is all.')
|
69
|
+
status.user.name.should == 'John Nunemaker'
|
70
|
+
status.text.should == 'Rob Dyrdek is the funniest man alive. That is all.'
|
71
|
+
end
|
72
|
+
|
73
|
+
should "be able to get replies" do
|
74
|
+
stub_get('/statuses/replies.json', 'replies.json')
|
75
|
+
replies = @twitter.replies
|
76
|
+
replies.size.should == 19
|
77
|
+
first = replies.first
|
78
|
+
first.user.name.should == '-oAk-'
|
79
|
+
first.text.should == '@jnunemaker cold out today. cold yesterday. even colder today.'
|
80
|
+
end
|
81
|
+
|
82
|
+
should "be able to get follower ids" do
|
83
|
+
stub_get('/followers/ids.json', 'follower_ids.json')
|
84
|
+
follower_ids = @twitter.follower_ids
|
85
|
+
follower_ids.size.should == 1252
|
86
|
+
follower_ids.first.should == 613
|
87
|
+
end
|
88
|
+
|
89
|
+
should "be able to get friend ids" do
|
90
|
+
stub_get('/friends/ids.json', 'friend_ids.json')
|
91
|
+
friend_ids = @twitter.friend_ids
|
92
|
+
friend_ids.size.should == 161
|
93
|
+
friend_ids.first.should == 15323
|
94
|
+
end
|
95
|
+
|
96
|
+
should "correctly hash statuses" do
|
97
|
+
stub_get('/statuses/friends_timeline.json', 'friends_timeline.json')
|
98
|
+
hashes = @twitter.friends_timeline.map{ |s| s.hash }
|
99
|
+
hashes.should == @twitter.friends_timeline.map{ |s| s.hash }
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class HTTPAuthTest < Test::Unit::TestCase
|
4
|
+
context "Creating new instance" do
|
5
|
+
should "should take user and password" do
|
6
|
+
twitter = Twitter::HTTPAuth.new('username', 'password')
|
7
|
+
twitter.username.should == 'username'
|
8
|
+
twitter.password.should == 'password'
|
9
|
+
end
|
10
|
+
|
11
|
+
should "accept options" do
|
12
|
+
twitter = Twitter::HTTPAuth.new('username', 'password', :ssl => true)
|
13
|
+
twitter.options.should == {:ssl => true}
|
14
|
+
end
|
15
|
+
|
16
|
+
should "default ssl to false" do
|
17
|
+
twitter = Twitter::HTTPAuth.new('username', 'password')
|
18
|
+
twitter.options[:ssl].should be(false)
|
19
|
+
end
|
20
|
+
|
21
|
+
should "use https if ssl is true" do
|
22
|
+
Twitter::HTTPAuth.expects(:base_uri).with('https://twitter.com')
|
23
|
+
twitter = Twitter::HTTPAuth.new('username', 'password', :ssl => true)
|
24
|
+
end
|
25
|
+
|
26
|
+
should "use http if ssl is false" do
|
27
|
+
Twitter::HTTPAuth.expects(:base_uri).with('http://twitter.com')
|
28
|
+
twitter = Twitter::HTTPAuth.new('username', 'password', :ssl => false)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context "Client methods" do
|
33
|
+
setup do
|
34
|
+
@twitter = Twitter::HTTPAuth.new('username', 'password')
|
35
|
+
end
|
36
|
+
|
37
|
+
should "not throw error when accessing response message" do
|
38
|
+
stub_get('http://username:password@twitter.com:80/statuses/user_timeline.json', 'user_timeline.json')
|
39
|
+
response = @twitter.get('/statuses/user_timeline.json')
|
40
|
+
response.message.should == 'OK'
|
41
|
+
end
|
42
|
+
|
43
|
+
should "be able to get" do
|
44
|
+
stub_get('http://username:password@twitter.com:80/statuses/user_timeline.json', 'user_timeline.json')
|
45
|
+
response = @twitter.get('/statuses/user_timeline.json')
|
46
|
+
response.should == fixture_file('user_timeline.json')
|
47
|
+
end
|
48
|
+
|
49
|
+
should "be able to get with headers" do
|
50
|
+
@twitter.class.expects(:get).with(
|
51
|
+
'/statuses/user_timeline.json', {
|
52
|
+
:basic_auth => {:username => 'username', :password => 'password'},
|
53
|
+
:headers => {'Foo' => 'Bar'}
|
54
|
+
}
|
55
|
+
).returns(fixture_file('user_timeline.json'))
|
56
|
+
@twitter.get('/statuses/user_timeline.json', {'Foo' => 'Bar'})
|
57
|
+
end
|
58
|
+
|
59
|
+
should "be able to post" do
|
60
|
+
stub_post('http://username:password@twitter.com:80/statuses/update.json', 'status.json')
|
61
|
+
response = @twitter.post('/statuses/update.json', :text => 'My update.')
|
62
|
+
response.should == fixture_file('status.json')
|
63
|
+
end
|
64
|
+
|
65
|
+
should "be able to post with headers" do
|
66
|
+
@twitter.class.expects(:post).with(
|
67
|
+
'/statuses/update.json', {
|
68
|
+
:headers => {'Foo' => 'Bar'},
|
69
|
+
:body => {:text => 'My update.'},
|
70
|
+
:basic_auth => {:username => 'username', :password => 'password'}
|
71
|
+
}
|
72
|
+
).returns(fixture_file('status.json'))
|
73
|
+
@twitter.post('/statuses/update.json', {:text => 'My update.'}, {'Foo' => 'Bar'})
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class OAuthTest < Test::Unit::TestCase
|
4
|
+
should "initialize with consumer token and secret" do
|
5
|
+
twitter = Twitter::OAuth.new('token', 'secret')
|
6
|
+
|
7
|
+
twitter.ctoken.should == 'token'
|
8
|
+
twitter.csecret.should == 'secret'
|
9
|
+
end
|
10
|
+
|
11
|
+
should "have a consumer" do
|
12
|
+
consumer = mock('oauth consumer')
|
13
|
+
OAuth::Consumer.expects(:new).with('token', 'secret', {:site => 'http://twitter.com'}).returns(consumer)
|
14
|
+
twitter = Twitter::OAuth.new('token', 'secret')
|
15
|
+
|
16
|
+
twitter.consumer.should == consumer
|
17
|
+
end
|
18
|
+
|
19
|
+
should "have a request token from the consumer" do
|
20
|
+
consumer = mock('oauth consumer')
|
21
|
+
request_token = mock('request token')
|
22
|
+
consumer.expects(:get_request_token).returns(request_token)
|
23
|
+
OAuth::Consumer.expects(:new).with('token', 'secret', {:site => 'http://twitter.com'}).returns(consumer)
|
24
|
+
twitter = Twitter::OAuth.new('token', 'secret')
|
25
|
+
|
26
|
+
twitter.request_token.should == request_token
|
27
|
+
end
|
28
|
+
|
29
|
+
should "be able to create access token from request token and secret" do
|
30
|
+
twitter = Twitter::OAuth.new('token', 'secret')
|
31
|
+
consumer = OAuth::Consumer.new('token', 'secret', {:site => 'http://twitter.com'})
|
32
|
+
twitter.stubs(:consumer).returns(consumer)
|
33
|
+
|
34
|
+
access_token = mock('access token', :token => 'atoken', :secret => 'asecret')
|
35
|
+
request_token = mock('request token')
|
36
|
+
request_token.expects(:get_access_token).returns(access_token)
|
37
|
+
OAuth::RequestToken.expects(:new).with(consumer, 'rtoken', 'rsecret').returns(request_token)
|
38
|
+
|
39
|
+
twitter.authorize_from_request('rtoken', 'rsecret')
|
40
|
+
twitter.access_token.class.should be(OAuth::AccessToken)
|
41
|
+
twitter.access_token.token.should == 'atoken'
|
42
|
+
twitter.access_token.secret.should == 'asecret'
|
43
|
+
end
|
44
|
+
|
45
|
+
should "be able to create access token from access token and secret" do
|
46
|
+
twitter = Twitter::OAuth.new('token', 'secret')
|
47
|
+
consumer = OAuth::Consumer.new('token', 'secret', {:site => 'http://twitter.com'})
|
48
|
+
twitter.stubs(:consumer).returns(consumer)
|
49
|
+
|
50
|
+
twitter.authorize_from_access('atoken', 'asecret')
|
51
|
+
twitter.access_token.class.should be(OAuth::AccessToken)
|
52
|
+
twitter.access_token.token.should == 'atoken'
|
53
|
+
twitter.access_token.secret.should == 'asecret'
|
54
|
+
end
|
55
|
+
|
56
|
+
should "delegate get to access token" do
|
57
|
+
access_token = mock('access token')
|
58
|
+
twitter = Twitter::OAuth.new('token', 'secret')
|
59
|
+
twitter.stubs(:access_token).returns(access_token)
|
60
|
+
access_token.expects(:get).returns(nil)
|
61
|
+
twitter.get('/foo')
|
62
|
+
end
|
63
|
+
|
64
|
+
should "delegate post to access token" do
|
65
|
+
access_token = mock('access token')
|
66
|
+
twitter = Twitter::OAuth.new('token', 'secret')
|
67
|
+
twitter.stubs(:access_token).returns(access_token)
|
68
|
+
access_token.expects(:post).returns(nil)
|
69
|
+
twitter.post('/foo')
|
70
|
+
end
|
71
|
+
end
|