Browse files

Add Users#contributors method

  • Loading branch information...
1 parent 7aba6b3 commit 1bb9f2000a322f9026681b78d1e8966409a333a2 @sferik committed Sep 5, 2011
View
40 lib/twitter/client/user.rb
@@ -238,7 +238,7 @@ def recommendations(options={})
format.to_s.downcase == 'xml' ? response['userrecommendations'] : response
end
- # Returns users the specified user can contribute to.
+ # Returns an array of users that the specified user can contribute to
#
# @see http://dev.twitter.com/docs/api/1/get/users/contributees
# @rate_limited Yes
@@ -275,6 +275,44 @@ def contributees(*args)
end
format.to_s.downcase == 'xml' ? response['users'] : response
end
+
+ # Returns an array of users who can contribute to the specified account
+ #
+ # @see http://dev.twitter.com/docs/api/1/get/users/contributors
+ # @rate_limited Yes
+ # @requires_authentication No unless requesting it from a protected user
+ #
+ # If getting this data of a protected user, you must authenticate (and be allowed to see that user).
+ # @response_format `json`
+ # @response_format `xml`
+ # @overload contributors(options={})
+ # @param options [Hash] A customizable set of options.
+ # @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
+ # @option options [Boolean, String, Integer] :skip_status Do not include contributee's statuses when set to true, 't' or 1.
+ # @return [Array]
+ # @example Return the authenticated user's contributors
+ # Twitter.contributors
+ ## @overload contributors(user, options={})
+ # @param user [Integer, String] A Twitter user ID or screen name.
+ # @param options [Hash] A customizable set of options.
+ # @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
+ # @option options [Boolean, String, Integer] :skip_status Do not include contributee's statuses when set to true, 't' or 1.
+ # @return [Array]
+ # @example Return users who can contribute to @sferik's account
+ # Twitter.contributors("sferik")
+ # Twitter.contributors(7505382) # Same as above
+ def contributors(*args)
+ options = {}
+ options.merge!(args.last.is_a?(Hash) ? args.pop : {})
+ user = args.pop || get_screen_name
+ if user
+ merge_user_into_options!(user, options)
+ response = get('1/users/contributors', options)
+ else
+ response = get('1/users/contributors', options)
+ end
+ format.to_s.downcase == 'xml' ? response['users'] : response
+ end
end
end
end
View
1 spec/fixtures/contributors.json
@@ -0,0 +1 @@
+[{"profile_sidebar_fill_color":"C0DFEC","protected":false,"id_str":"13","notifications":false,"profile_background_tile":false,"screen_name":"biz","name":"Biz Stone","display_url":"bizstone.com","listed_count":15392,"location":"San Francisco, CA","expanded_url":"http:\/\/www.bizstone.com","show_all_inline_media":true,"contributors_enabled":false,"following":false,"geo_enabled":true,"utc_offset":-28800,"profile_link_color":"0084B4","description":"Co-founder of Twitter, Inc.","profile_sidebar_border_color":"a8c7f7","url":"http:\/\/t.co\/bdlNWgB","time_zone":"Pacific Time (US & Canada)","status":{"id_str":"110109632814518272","in_reply_to_status_id":null,"truncated":false,"favorited":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"geo":null,"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"coordinates":null,"in_reply_to_user_id":null,"source":"\u003Ca href=\"http:\/\/flickr.com\/services\/twitter\/\" rel=\"nofollow\"\u003EFlickr\u003C\/a\u003E","created_at":"Sat Sep 03 21:59:16 +0000 2011","contributors":null,"retweeted":false,"retweet_count":4,"id":110109632814518272,"place":null,"text":"Cavallo Point Dandelion http:\/\/t.co\/nv0gcpL"},"default_profile_image":false,"statuses_count":4466,"profile_use_background_image":true,"verified":true,"favourites_count":869,"friends_count":530,"profile_background_color":"022330","is_translator":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme15\/bg.png","created_at":"Tue Mar 21 20:51:43 +0000 2006","followers_count":1765283,"entities":{"user_mentions":[],"urls":[],"hashtags":[]},"default_profile":false,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme15\/bg.png","id":13,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/513819852\/biz_stone_normal.jpg","profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/513819852\/biz_stone_normal.jpg"},{"profile_sidebar_fill_color":"454A43","protected":false,"id_str":"20","notifications":false,"profile_background_tile":true,"screen_name":"ev","name":"Evan Williams","display_url":"evhead.com","listed_count":17223,"location":"San Francisco, CA, US","expanded_url":"http:\/\/evhead.com","show_all_inline_media":true,"contributors_enabled":false,"following":false,"geo_enabled":true,"utc_offset":-28800,"profile_link_color":"A8AB9A","description":"Farm boy from Nebraska. Husband and father. Co-founder of Twitter. Partner at @ObviousCorp","profile_sidebar_border_color":"E23912","url":"http:\/\/t.co\/C2HZiQ4","time_zone":"Pacific Time (US & Canada)","status":{"id_str":"109843207965261824","in_reply_to_status_id":109841684006838272,"truncated":false,"favorited":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"109841684006838272","geo":null,"in_reply_to_screen_name":"chrissyteigen","in_reply_to_user_id_str":"39364684","coordinates":null,"in_reply_to_user_id":39364684,"source":"\u003Ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E","created_at":"Sat Sep 03 04:20:36 +0000 2011","contributors":null,"retweeted":false,"retweet_count":3,"id":109843207965261824,"place":null,"text":"@chrissyteigen Well, at least you didn't want fried chicken and potato salad. Just saw this today: http:\/\/t.co\/hO4eIrl"},"default_profile_image":false,"statuses_count":6316,"profile_use_background_image":true,"verified":true,"favourites_count":1852,"friends_count":1346,"profile_background_color":"D4BEA7","is_translator":false,"default_profile":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/313094643\/COLOURlovers.com-Indecent_Exposure-.png","created_at":"Tue Mar 21 21:02:31 +0000 2006","followers_count":1386646,"entities":{"user_mentions":[{"name":"Obvious Corporation","screen_name":"obviouscorp","id_str":"322904764","indices":[78,90],"id":322904764}],"urls":[],"hashtags":[]},"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/313094643\/COLOURlovers.com-Indecent_Exposure-.png","id":20,"profile_text_color":"C3B7A1","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1275356729\/evedit0xr_2__1__normal.jpg","profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1275356729\/evedit0xr_2__1__normal.jpg"},{"profile_sidebar_fill_color":"e0ff92","protected":false,"id_str":"822571","notifications":false,"profile_background_tile":false,"screen_name":"SG","name":"Sean Garrett","display_url":null,"listed_count":403,"location":"San Francisco","expanded_url":null,"show_all_inline_media":true,"contributors_enabled":false,"following":false,"geo_enabled":true,"utc_offset":-28800,"profile_link_color":"0000ff","description":"Ephemeral whinging aspects. Twitter, Inc. comms.","profile_sidebar_border_color":"87bc44","url":null,"time_zone":"Pacific Time (US & Canada)","status":{"id_str":"110015226308591616","in_reply_to_status_id":null,"truncated":false,"favorited":false,"in_reply_to_status_id_str":null,"geo":null,"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"coordinates":null,"in_reply_to_user_id":null,"source":"\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E","created_at":"Sat Sep 03 15:44:08 +0000 2011","contributors":null,"retweeted":false,"retweet_count":0,"id":110015226308591616,"place":null,"text":"Looking forward to the quirky infographic on the growth of quirky infigraphics."},"default_profile_image":false,"default_profile":false,"statuses_count":3436,"profile_use_background_image":true,"verified":false,"favourites_count":94,"friends_count":961,"profile_background_color":"9ae4e8","is_translator":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/25315274\/07-05-2003__44.jpg","created_at":"Thu Mar 08 18:38:33 +0000 2007","followers_count":15629,"entities":{"user_mentions":[],"urls":[],"hashtags":[]},"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/25315274\/07-05-2003__44.jpg","id":822571,"profile_text_color":"000000","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1041950033\/capt.80e1b2df11e243c0b9c78f70a49a8394-80e1b2df11e243c0b9c78f70a49a8394-0_normal.jpg","profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1041950033\/capt.80e1b2df11e243c0b9c78f70a49a8394-80e1b2df11e243c0b9c78f70a49a8394-0_normal.jpg"},{"profile_sidebar_fill_color":"FFF7CC","protected":false,"id_str":"7694352","notifications":false,"profile_background_tile":true,"screen_name":"cpen","name":"Carolyn Penner","display_url":"cpen.posterous.com","listed_count":296,"location":"San Francisco","expanded_url":"http:\/\/cpen.posterous.com\/","show_all_inline_media":true,"contributors_enabled":true,"following":false,"geo_enabled":true,"utc_offset":-28800,"profile_link_color":"3851de","description":"twitter comms. mobile geek. laughs easily. talks loudly. and, according to @sg, the she in that's what she said","profile_sidebar_border_color":"F2E195","url":"http:\/\/t.co\/sWhRERk","time_zone":"Pacific Time (US & Canada)","status":{"id_str":"110109700942598144","in_reply_to_status_id":null,"truncated":false,"favorited":false,"in_reply_to_status_id_str":null,"geo":null,"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"coordinates":null,"in_reply_to_user_id":null,"source":"\u003Ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E","created_at":"Sat Sep 03 21:59:33 +0000 2011","contributors":null,"retweeted":false,"retweet_count":0,"id":110109700942598144,"place":null,"text":"Lots of people in white today. Like, all white. #LaborDayCountdown"},"default_profile_image":false,"statuses_count":6231,"profile_use_background_image":true,"verified":false,"favourites_count":446,"friends_count":384,"profile_background_color":"BADFCD","is_translator":false,"default_profile":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/269139380\/sunset_benches.jpg","created_at":"Tue Jul 24 20:43:20 +0000 2007","followers_count":8505,"entities":{"user_mentions":[{"name":"Sean Garrett","screen_name":"SG","id_str":"822571","indices":[75,78],"id":822571}],"urls":[],"hashtags":[]},"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/269139380\/sunset_benches.jpg","id":7694352,"profile_text_color":"0C3E53","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1054499775\/profile2_normal.png","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1054499775\/profile2_normal.png"},{"default_profile":true,"profile_sidebar_fill_color":"DDEEF6","protected":false,"id_str":"14013722","notifications":null,"profile_background_tile":false,"screen_name":"mgrooves","name":"Matt Graves","display_url":null,"listed_count":186,"location":"San Francisco","expanded_url":null,"show_all_inline_media":true,"contributors_enabled":true,"following":null,"geo_enabled":true,"utc_offset":-28800,"profile_link_color":"0084B4","description":"twitter comms. lover of loud music and louder laughs.","profile_sidebar_border_color":"C0DEED","url":null,"time_zone":"Pacific Time (US & Canada)","status":{"id_str":"108792113889689600","in_reply_to_status_id":108715659239759872,"truncated":false,"favorited":false,"in_reply_to_status_id_str":"108715659239759872","geo":{"type":"Point","coordinates":[39.47795653,-119.82139879]},"in_reply_to_screen_name":"willotoons","in_reply_to_user_id_str":"772386","coordinates":{"type":"Point","coordinates":[-119.82139879,39.47795653]},"in_reply_to_user_id":772386,"source":"\u003Ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E","created_at":"Wed Aug 31 06:43:55 +0000 2011","contributors":null,"retweeted":false,"retweet_count":0,"id":108792113889689600,"place":{"name":"Reno","attributes":{},"full_name":"Reno, NV","url":"http:\/\/api.twitter.com\/1\/geo\/id\/4b25aded08900fd8.json","country_code":"US","bounding_box":{"type":"Polygon","coordinates":[[[-119.943728,39.416409],[-119.723736,39.416409],[-119.723736,39.693608],[-119.943728,39.693608]]]},"place_type":"city","country":"United States","id":"4b25aded08900fd8"},"text":"@willotoons @sfbg Good to know where you stand on the boobs v. butts issue. #important"},"default_profile_image":false,"statuses_count":3805,"profile_use_background_image":true,"verified":false,"favourites_count":193,"friends_count":857,"profile_background_color":"C0DEED","is_translator":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","created_at":"Tue Feb 26 17:06:58 +0000 2008","followers_count":4613,"entities":{"user_mentions":[],"urls":[],"hashtags":[]},"follow_request_sent":null,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","id":14013722,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1230241496\/Photo_on_2011-01-30_at_13.57__2_normal.jpg","profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1230241496\/Photo_on_2011-01-30_at_13.57__2_normal.jpg"},{"profile_sidebar_fill_color":"F6F6F6","protected":false,"id_str":"16259374","notifications":false,"profile_background_tile":false,"screen_name":"jodiolson","name":"jodiolson","display_url":null,"listed_count":77,"location":"San Francisco","expanded_url":null,"show_all_inline_media":true,"contributors_enabled":false,"following":false,"geo_enabled":true,"utc_offset":-28800,"profile_link_color":"038543","description":"Twitter PR, mother, cook and aspiring gardener. Authentic but unverified.","profile_sidebar_border_color":"EEEEEE","url":null,"time_zone":"Pacific Time (US & Canada)","status":{"id_str":"109334062912638976","in_reply_to_status_id":null,"truncated":false,"favorited":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"geo":null,"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"coordinates":null,"in_reply_to_user_id":null,"source":"web","created_at":"Thu Sep 01 18:37:26 +0000 2011","contributors":null,"retweeted":false,"retweet_count":1,"id":109334062912638976,"place":null,"text":"A note from @jack to Twitter developers: http:\/\/t.co\/rWZ2TpE"},"default_profile_image":false,"default_profile":false,"statuses_count":1395,"profile_use_background_image":true,"verified":false,"favourites_count":14,"friends_count":596,"profile_background_color":"ACDED6","is_translator":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/images\/themes\/theme18\/bg.gif","created_at":"Fri Sep 12 17:26:39 +0000 2008","followers_count":2907,"entities":{"user_mentions":[],"urls":[],"hashtags":[]},"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme18\/bg.gif","id":16259374,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/125848090\/JO_lisbon_normal_normal.jpg","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/125848090\/JO_lisbon_normal_normal.jpg"},{"follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/189647945\/xd9f362b4c1859de155db40b6a282d8d.jpg","protected":false,"notifications":null,"profile_text_color":"8C94A2","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1224057555\/photo-31_normal.jpeg","screen_name":"jennadawn","name":"jenna","profile_sidebar_fill_color":"424c55","location":"San Francisco ","id_str":"16739704","following":null,"profile_background_tile":false,"utc_offset":-28800,"description":"An Alaskan realizing the merit of urbanism via SF. Those who think idealism is naive only care to neglect. ","display_url":null,"listed_count":842,"url":null,"expanded_url":null,"show_all_inline_media":true,"contributors_enabled":false,"geo_enabled":true,"profile_link_color":"8cb2bd","status":{"contributors":null,"retweeted":false,"retweet_count":0,"id_str":"109474557777281024","in_reply_to_status_id":null,"truncated":false,"geo":null,"favorited":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"coordinates":null,"source":"\u003Ca href=\"http:\/\/twitter.com\/download\/android\" rel=\"nofollow\"\u003ETwitter for Android\u003C\/a\u003E","created_at":"Fri Sep 02 03:55:44 +0000 2011","in_reply_to_screen_name":null,"id":109474557777281024,"in_reply_to_user_id_str":null,"place":null,"in_reply_to_user_id":null,"text":"My special friends. http:\/\/t.co\/5JqNrmC"},"profile_sidebar_border_color":"8cb2bd","time_zone":"Pacific Time (US & Canada)","default_profile_image":false,"statuses_count":1609,"profile_use_background_image":true,"created_at":"Tue Oct 14 15:31:55 +0000 2008","entities":{"hashtags":[],"user_mentions":[],"urls":[]},"lang":"en","verified":false,"favourites_count":43,"friends_count":489,"profile_background_color":"ffffff","id":16739704,"is_translator":true,"default_profile":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/189647945\/xd9f362b4c1859de155db40b6a282d8d.jpg","followers_count":308123,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1224057555\/photo-31_normal.jpeg"},{"profile_sidebar_fill_color":"FFC36E","protected":false,"id_str":"145727626","notifications":null,"profile_background_tile":true,"screen_name":"juliedelcarlo","name":"Julie Del Carlo","display_url":null,"listed_count":46,"location":"","expanded_url":null,"show_all_inline_media":true,"contributors_enabled":false,"following":null,"geo_enabled":true,"utc_offset":-28800,"profile_link_color":"DD4969","description":"","profile_sidebar_border_color":"F8F2E6","url":null,"time_zone":"Pacific Time (US & Canada)","status":{"id_str":"108622547423199232","in_reply_to_status_id":null,"truncated":false,"favorited":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"geo":null,"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"coordinates":null,"in_reply_to_user_id":null,"source":"\u003Ca href=\"http:\/\/twitter.com\/download\/android\" rel=\"nofollow\"\u003ETwitter for Android\u003C\/a\u003E","created_at":"Tue Aug 30 19:30:08 +0000 2011","contributors":null,"retweeted":false,"retweet_count":0,"id":108622547423199232,"place":null,"text":"A very happy birthday to @che! #francisco http:\/\/t.co\/LUjIvI6"},"default_profile_image":false,"default_profile":false,"statuses_count":402,"profile_use_background_image":true,"verified":false,"favourites_count":8,"friends_count":586,"profile_background_color":"FBC2CE","is_translator":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/319117928\/xbad02b8c30148db3a7d53570a0acdbf.png","created_at":"Wed May 19 18:32:50 +0000 2010","followers_count":3823,"entities":{"user_mentions":[],"urls":[],"hashtags":[]},"follow_request_sent":null,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/319117928\/xbad02b8c30148db3a7d53570a0acdbf.png","id":145727626,"profile_text_color":"5A4A37","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1441125224\/me_in_nyc_normal","profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1441125224\/me_in_nyc_normal"},{"profile_sidebar_fill_color":"F7F9F9","protected":false,"id_str":"22824309","notifications":false,"profile_background_tile":true,"screen_name":"RachaelRad","name":"Rachael Horwitz","display_url":null,"listed_count":38,"location":"San Francisco, CA","expanded_url":null,"show_all_inline_media":true,"contributors_enabled":false,"following":false,"geo_enabled":false,"utc_offset":-28800,"profile_link_color":"000807","description":"Twitter Communications. Short person. Loud voice. More than just a pizzabagel. ","profile_sidebar_border_color":"EBD98D","url":null,"time_zone":"Pacific Time (US & Canada)","status":{"id_str":"110116509141045249","in_reply_to_status_id":null,"truncated":false,"favorited":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"geo":null,"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"coordinates":null,"in_reply_to_user_id":null,"source":"\u003Ca href=\"http:\/\/twitter.com\/download\/android\" rel=\"nofollow\"\u003ETwitter for Android\u003C\/a\u003E","created_at":"Sat Sep 03 22:26:36 +0000 2011","contributors":null,"retweeted":false,"retweet_count":0,"id":110116509141045249,"place":null,"text":"Greetings from Oregon! http:\/\/t.co\/slpi8xr"},"default_profile_image":false,"statuses_count":2325,"profile_use_background_image":true,"default_profile":false,"verified":false,"favourites_count":51,"friends_count":682,"profile_background_color":"665147","is_translator":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/315104167\/x9d3c16ade13b57b2abe466f3b154311.jpg","created_at":"Wed Mar 04 19:57:26 +0000 2009","followers_count":869,"entities":{"user_mentions":[],"urls":[],"hashtags":[]},"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/315104167\/x9d3c16ade13b57b2abe466f3b154311.jpg","id":22824309,"profile_text_color":"090700","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1408115265\/186227_587309531_8155668_n_normal.jpg","profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1408115265\/186227_587309531_8155668_n_normal.jpg"},{"profile_sidebar_fill_color":"fdfcfc","protected":false,"id_str":"3446291","notifications":null,"profile_background_tile":true,"screen_name":"rbremer","name":"Rachel Bremer","display_url":null,"listed_count":36,"location":"London","expanded_url":null,"show_all_inline_media":true,"contributors_enabled":false,"following":null,"geo_enabled":false,"utc_offset":0,"profile_link_color":"0000ff","description":"European communications manager for Twitter. That's enough for now.","profile_sidebar_border_color":"e6e9e2","url":null,"time_zone":"London","status":{"id_str":"109924107214258176","in_reply_to_status_id":null,"truncated":false,"favorited":false,"in_reply_to_status_id_str":null,"geo":null,"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"coordinates":null,"in_reply_to_user_id":null,"source":"\u003Ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E","created_at":"Sat Sep 03 09:42:04 +0000 2011","contributors":null,"retweeted":false,"retweet_count":0,"id":109924107214258176,"place":null,"text":"On our way to Burghley for a day of horsey stuff..."},"default_profile_image":false,"statuses_count":2556,"profile_use_background_image":true,"verified":false,"favourites_count":31,"friends_count":557,"profile_background_color":"9ae4e8","is_translator":false,"profile_background_image_url":"http:\/\/a2.twimg.com\/profile_background_images\/4036889\/Twitter.jpg","created_at":"Wed Apr 04 18:09:44 +0000 2007","followers_count":1666,"entities":{"user_mentions":[],"urls":[],"hashtags":[]},"default_profile":false,"follow_request_sent":null,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/4036889\/Twitter.jpg","id":3446291,"profile_text_color":"000000","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1370853870\/RYB_headshot_sm_normal.jpg","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1370853870\/RYB_headshot_sm_normal.jpg"},{"profile_sidebar_fill_color":"DDFFCC","protected":false,"id_str":"14769591","notifications":false,"profile_background_tile":true,"screen_name":"foxycar","name":"Lynn Fox","display_url":null,"listed_count":198,"location":"","expanded_url":null,"show_all_inline_media":true,"contributors_enabled":false,"following":false,"geo_enabled":true,"utc_offset":-28800,"profile_link_color":"0084B4","description":"Twitter Comms. OH'ing myself.","default_profile":false,"profile_sidebar_border_color":"BDDCAD","url":null,"time_zone":"Pacific Time (US & Canada)","status":{"id_str":"110023646487117824","in_reply_to_status_id":null,"truncated":false,"favorited":false,"in_reply_to_status_id_str":null,"geo":null,"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"coordinates":null,"in_reply_to_user_id":null,"source":"web","created_at":"Sat Sep 03 16:17:36 +0000 2011","contributors":null,"retweeted":false,"retweet_count":0,"id":110023646487117824,"place":null,"text":"Just showed \"Who's on first?\" to the boys. Classic."},"default_profile_image":false,"statuses_count":4058,"profile_use_background_image":true,"verified":false,"favourites_count":44,"friends_count":969,"profile_background_color":"9AE4E8","is_translator":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/143745093\/Photo_102.jpg","created_at":"Wed May 14 05:26:31 +0000 2008","followers_count":2702,"entities":{"user_mentions":[],"urls":[],"hashtags":[]},"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/143745093\/Photo_102.jpg","id":14769591,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1134096793\/bio_photo_small_normal.jpg","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1134096793\/bio_photo_small_normal.jpg"},{"profile_sidebar_fill_color":"e0ff92","protected":false,"id_str":"14589956","notifications":false,"profile_background_tile":true,"screen_name":"kh","name":"kristen","display_url":"about.me\/kristenhawley","listed_count":57,"location":"San Francisco","expanded_url":"http:\/\/about.me\/kristenhawley","show_all_inline_media":true,"contributors_enabled":false,"following":false,"geo_enabled":true,"utc_offset":-28800,"profile_link_color":"B21515","description":"I'm a fun girl! Also, communications at Twitter","default_profile":false,"profile_sidebar_border_color":"2DA530","url":"http:\/\/t.co\/B6brkVp","time_zone":"Pacific Time (US & Canada)","status":{"id_str":"110115169379684353","in_reply_to_status_id":null,"truncated":false,"favorited":false,"in_reply_to_status_id_str":null,"geo":{"type":"Point","coordinates":[38.47005683,-123.01459763]},"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"coordinates":{"type":"Point","coordinates":[-123.01459763,38.47005683]},"in_reply_to_user_id":null,"source":"\u003Ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E","created_at":"Sat Sep 03 22:21:16 +0000 2011","contributors":null,"retweeted":false,"retweet_count":0,"id":110115169379684353,"place":{"name":"Monte Rio","attributes":{},"full_name":"Monte Rio, CA","url":"http:\/\/api.twitter.com\/1\/geo\/id\/aa352d4b3a8983c0.json","country_code":"US","bounding_box":{"type":"Polygon","coordinates":[[[-123.03198,38.455777],[-122.991321,38.455777],[-122.991321,38.476978],[-123.03198,38.476978]]]},"place_type":"city","country":"United States","id":"aa352d4b3a8983c0"},"text":"Happy where I am, happy where I am going."},"default_profile_image":false,"statuses_count":3946,"profile_use_background_image":true,"verified":false,"favourites_count":210,"friends_count":230,"profile_background_color":"9ae4e8","is_translator":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/8116121\/Picture_1.png","created_at":"Tue Apr 29 20:06:27 +0000 2008","followers_count":1825,"entities":{"user_mentions":[],"urls":[],"hashtags":[]},"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/8116121\/Picture_1.png","id":14589956,"profile_text_color":"000000","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1352279358\/twitterpic_normal.jpg","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1352279358\/twitterpic_normal.jpg"}]
View
807 spec/fixtures/contributors.xml
@@ -0,0 +1,807 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<users type="array">
+<user>
+ <id>13</id>
+ <name>Biz Stone</name>
+ <screen_name>biz</screen_name>
+ <location>San Francisco, CA</location>
+ <description>Co-founder of Twitter, Inc.</description>
+ <profile_image_url>http://a0.twimg.com/profile_images/513819852/biz_stone_normal.jpg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/513819852/biz_stone_normal.jpg</profile_image_url_https>
+ <url>http://t.co/bdlNWgB</url>
+ <protected>false</protected>
+ <followers_count>1765282</followers_count>
+ <profile_background_color>022330</profile_background_color>
+ <profile_text_color>333333</profile_text_color>
+ <profile_link_color>0084B4</profile_link_color>
+ <profile_sidebar_fill_color>C0DFEC</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>a8c7f7</profile_sidebar_border_color>
+ <friends_count>530</friends_count>
+ <created_at>Tue Mar 21 20:51:43 +0000 2006</created_at>
+ <favourites_count>869</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a0.twimg.com/images/themes/theme15/bg.png</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/images/themes/theme15/bg.png</profile_background_image_url_https>
+ <profile_background_tile>false</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications></notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>true</verified>
+ <following></following>
+ <statuses_count>4466</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent></follow_request_sent>
+ <listed_count>15392</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url>http://www.bizstone.com</expanded_url>
+ <display_url>bizstone.com</display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Sat Sep 03 21:59:16 +0000 2011</created_at>
+ <id>110109632814518272</id>
+ <text>Cavallo Point Dandelion http://t.co/nv0gcpL</text>
+ <source>&lt;a href=&quot;http://flickr.com/services/twitter/&quot; rel=&quot;nofollow&quot;&gt;Flickr&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>4</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <possibly_sensitive>false</possibly_sensitive>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>20</id>
+ <name>Evan Williams</name>
+ <screen_name>ev</screen_name>
+ <location>San Francisco, CA, US</location>
+ <description>Farm boy from Nebraska. Husband and father. Co-founder of Twitter. Partner at @ObviousCorp</description>
+ <profile_image_url>http://a1.twimg.com/profile_images/1275356729/evedit0xr_2__1__normal.jpg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1275356729/evedit0xr_2__1__normal.jpg</profile_image_url_https>
+ <url>http://t.co/C2HZiQ4</url>
+ <protected>false</protected>
+ <followers_count>1386646</followers_count>
+ <profile_background_color>D4BEA7</profile_background_color>
+ <profile_text_color>C3B7A1</profile_text_color>
+ <profile_link_color>A8AB9A</profile_link_color>
+ <profile_sidebar_fill_color>454A43</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>E23912</profile_sidebar_border_color>
+ <friends_count>1346</friends_count>
+ <created_at>Tue Mar 21 21:02:31 +0000 2006</created_at>
+ <favourites_count>1852</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a1.twimg.com/profile_background_images/313094643/COLOURlovers.com-Indecent_Exposure-.png</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/profile_background_images/313094643/COLOURlovers.com-Indecent_Exposure-.png</profile_background_image_url_https>
+ <profile_background_tile>true</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications>false</notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>true</verified>
+ <following>false</following>
+ <statuses_count>6316</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent>false</follow_request_sent>
+ <listed_count>17223</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url>http://evhead.com</expanded_url>
+ <display_url>evhead.com</display_url>
+ <entities>
+ <user_mentions>
+ <user_mention end="90" start="78">
+ <id>322904764</id>
+ <screen_name>obviouscorp</screen_name>
+ <name>Obvious Corporation</name>
+ </user_mention>
+ </user_mentions>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Sat Sep 03 04:20:36 +0000 2011</created_at>
+ <id>109843207965261824</id>
+ <text>@chrissyteigen Well, at least you didn't want fried chicken and potato salad. Just saw this today: http://t.co/hO4eIrl</text>
+ <source>&lt;a href=&quot;http://twitter.com/#!/download/iphone&quot; rel=&quot;nofollow&quot;&gt;Twitter for iPhone&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id>109841684006838272</in_reply_to_status_id>
+ <in_reply_to_user_id>39364684</in_reply_to_user_id>
+ <in_reply_to_screen_name>chrissyteigen</in_reply_to_screen_name>
+ <retweet_count>3</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <possibly_sensitive>false</possibly_sensitive>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>822571</id>
+ <name>Sean Garrett</name>
+ <screen_name>SG</screen_name>
+ <location>San Francisco</location>
+ <description>Ephemeral whinging aspects. Twitter, Inc. comms.</description>
+ <profile_image_url>http://a3.twimg.com/profile_images/1041950033/capt.80e1b2df11e243c0b9c78f70a49a8394-80e1b2df11e243c0b9c78f70a49a8394-0_normal.jpg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1041950033/capt.80e1b2df11e243c0b9c78f70a49a8394-80e1b2df11e243c0b9c78f70a49a8394-0_normal.jpg</profile_image_url_https>
+ <url></url>
+ <protected>false</protected>
+ <followers_count>15629</followers_count>
+ <profile_background_color>9ae4e8</profile_background_color>
+ <profile_text_color>000000</profile_text_color>
+ <profile_link_color>0000ff</profile_link_color>
+ <profile_sidebar_fill_color>e0ff92</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>87bc44</profile_sidebar_border_color>
+ <friends_count>961</friends_count>
+ <created_at>Thu Mar 08 18:38:33 +0000 2007</created_at>
+ <favourites_count>94</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a0.twimg.com/profile_background_images/25315274/07-05-2003__44.jpg</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/profile_background_images/25315274/07-05-2003__44.jpg</profile_background_image_url_https>
+ <profile_background_tile>false</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications>false</notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>false</verified>
+ <following>false</following>
+ <statuses_count>3436</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent>false</follow_request_sent>
+ <listed_count>403</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url></expanded_url>
+ <display_url></display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Sat Sep 03 15:44:08 +0000 2011</created_at>
+ <id>110015226308591616</id>
+ <text>Looking forward to the quirky infographic on the growth of quirky infigraphics.</text>
+ <source>&lt;a href=&quot;http://twitter.com&quot; rel=&quot;nofollow&quot;&gt;Twitter for iPhone&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>0</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>7694352</id>
+ <name>Carolyn Penner</name>
+ <screen_name>cpen</screen_name>
+ <location>San Francisco</location>
+ <description>twitter comms. mobile geek. laughs easily. talks loudly. and, according to @sg, the she in that's what she said</description>
+ <profile_image_url>http://a2.twimg.com/profile_images/1054499775/profile2_normal.png</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1054499775/profile2_normal.png</profile_image_url_https>
+ <url>http://t.co/sWhRERk</url>
+ <protected>false</protected>
+ <followers_count>8505</followers_count>
+ <profile_background_color>BADFCD</profile_background_color>
+ <profile_text_color>0C3E53</profile_text_color>
+ <profile_link_color>3851de</profile_link_color>
+ <profile_sidebar_fill_color>FFF7CC</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>F2E195</profile_sidebar_border_color>
+ <friends_count>384</friends_count>
+ <created_at>Tue Jul 24 20:43:20 +0000 2007</created_at>
+ <favourites_count>446</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a0.twimg.com/profile_background_images/269139380/sunset_benches.jpg</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/profile_background_images/269139380/sunset_benches.jpg</profile_background_image_url_https>
+ <profile_background_tile>true</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications>false</notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>false</verified>
+ <following>false</following>
+ <statuses_count>6231</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>true</contributors_enabled>
+ <follow_request_sent>false</follow_request_sent>
+ <listed_count>296</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url>http://cpen.posterous.com/</expanded_url>
+ <display_url>cpen.posterous.com</display_url>
+ <entities>
+ <user_mentions>
+ <user_mention end="78" start="75">
+ <id>822571</id>
+ <screen_name>SG</screen_name>
+ <name>Sean Garrett</name>
+ </user_mention>
+ </user_mentions>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Sat Sep 03 21:59:33 +0000 2011</created_at>
+ <id>110109700942598144</id>
+ <text>Lots of people in white today. Like, all white. #LaborDayCountdown</text>
+ <source>&lt;a href=&quot;http://twitter.com/#!/download/iphone&quot; rel=&quot;nofollow&quot;&gt;Twitter for iPhone&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>0</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>14013722</id>
+ <name>Matt Graves</name>
+ <screen_name>mgrooves</screen_name>
+ <location>San Francisco</location>
+ <description>twitter comms. lover of loud music and louder laughs.</description>
+ <profile_image_url>http://a3.twimg.com/profile_images/1230241496/Photo_on_2011-01-30_at_13.57__2_normal.jpg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1230241496/Photo_on_2011-01-30_at_13.57__2_normal.jpg</profile_image_url_https>
+ <url></url>
+ <protected>false</protected>
+ <followers_count>4613</followers_count>
+ <profile_background_color>C0DEED</profile_background_color>
+ <profile_text_color>333333</profile_text_color>
+ <profile_link_color>0084B4</profile_link_color>
+ <profile_sidebar_fill_color>DDEEF6</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>C0DEED</profile_sidebar_border_color>
+ <friends_count>857</friends_count>
+ <created_at>Tue Feb 26 17:06:58 +0000 2008</created_at>
+ <favourites_count>193</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a0.twimg.com/images/themes/theme1/bg.png</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/images/themes/theme1/bg.png</profile_background_image_url_https>
+ <profile_background_tile>false</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications></notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>false</verified>
+ <following></following>
+ <statuses_count>3805</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>true</contributors_enabled>
+ <follow_request_sent></follow_request_sent>
+ <listed_count>186</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>true</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url></expanded_url>
+ <display_url></display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Wed Aug 31 06:43:55 +0000 2011</created_at>
+ <id>108792113889689600</id>
+ <text>@willotoons @sfbg Good to know where you stand on the boobs v. butts issue. #important</text>
+ <source>&lt;a href=&quot;http://twitter.com/#!/download/iphone&quot; rel=&quot;nofollow&quot;&gt;Twitter for iPhone&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id>108715659239759872</in_reply_to_status_id>
+ <in_reply_to_user_id>772386</in_reply_to_user_id>
+ <in_reply_to_screen_name>willotoons</in_reply_to_screen_name>
+ <retweet_count>0</retweet_count>
+ <retweeted>false</retweeted>
+ <geo xmlns:georss="http://www.georss.org/georss">
+ <georss:point>39.47795653 -119.82139879</georss:point>
+ </geo>
+ <coordinates xmlns:georss="http://www.georss.org/georss">
+ <georss:point>39.47795653 -119.82139879</georss:point>
+ </coordinates>
+ <place xmlns:georss="http://www.georss.org/georss">
+ <id>4b25aded08900fd8</id>
+ <name>Reno</name>
+ <full_name>Reno, NV</full_name>
+ <place_type>city</place_type>
+ <url>http://api.twitter.com/1/geo/id/4b25aded08900fd8.json</url>
+ <attributes/>
+ <bounding_box>
+ <georss:polygon>39.416409 -119.943728 39.416409 -119.723736 39.693608 -119.723736 39.693608 -119.943728</georss:polygon>
+ </bounding_box>
+ <country code="US">United States</country>
+ </place>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>16259374</id>
+ <name>jodiolson</name>
+ <screen_name>jodiolson</screen_name>
+ <location>San Francisco</location>
+ <description>Twitter PR, mother, cook and aspiring gardener. Authentic but unverified.</description>
+ <profile_image_url>http://a2.twimg.com/profile_images/125848090/JO_lisbon_normal_normal.jpg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/125848090/JO_lisbon_normal_normal.jpg</profile_image_url_https>
+ <url></url>
+ <protected>false</protected>
+ <followers_count>2907</followers_count>
+ <profile_background_color>ACDED6</profile_background_color>
+ <profile_text_color>333333</profile_text_color>
+ <profile_link_color>038543</profile_link_color>
+ <profile_sidebar_fill_color>F6F6F6</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>EEEEEE</profile_sidebar_border_color>
+ <friends_count>596</friends_count>
+ <created_at>Fri Sep 12 17:26:39 +0000 2008</created_at>
+ <favourites_count>14</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a1.twimg.com/images/themes/theme18/bg.gif</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/images/themes/theme18/bg.gif</profile_background_image_url_https>
+ <profile_background_tile>false</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications>false</notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>false</verified>
+ <following>false</following>
+ <statuses_count>1395</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent>false</follow_request_sent>
+ <listed_count>77</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url></expanded_url>
+ <display_url></display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Thu Sep 01 18:37:26 +0000 2011</created_at>
+ <id>109334062912638976</id>
+ <text>A note from @jack to Twitter developers: http://t.co/rWZ2TpE</text>
+ <source>web</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>1</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <possibly_sensitive>false</possibly_sensitive>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>16739704</id>
+ <name>jenna</name>
+ <screen_name>jennadawn</screen_name>
+ <location>San Francisco </location>
+ <description>An Alaskan realizing the merit of urbanism via SF. Those who think idealism is naive only care to neglect. </description>
+ <profile_image_url>http://a3.twimg.com/profile_images/1224057555/photo-31_normal.jpeg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1224057555/photo-31_normal.jpeg</profile_image_url_https>
+ <url></url>
+ <protected>false</protected>
+ <followers_count>308123</followers_count>
+ <profile_background_color>ffffff</profile_background_color>
+ <profile_text_color>8C94A2</profile_text_color>
+ <profile_link_color>8cb2bd</profile_link_color>
+ <profile_sidebar_fill_color>424c55</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>8cb2bd</profile_sidebar_border_color>
+ <friends_count>489</friends_count>
+ <created_at>Tue Oct 14 15:31:55 +0000 2008</created_at>
+ <favourites_count>43</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a0.twimg.com/profile_background_images/189647945/xd9f362b4c1859de155db40b6a282d8d.jpg</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/profile_background_images/189647945/xd9f362b4c1859de155db40b6a282d8d.jpg</profile_background_image_url_https>
+ <profile_background_tile>false</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications>false</notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>false</verified>
+ <following>false</following>
+ <statuses_count>1609</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent>false</follow_request_sent>
+ <listed_count>842</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url></expanded_url>
+ <display_url></display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>true</is_translator>
+ <status>
+ <created_at>Fri Sep 02 03:55:44 +0000 2011</created_at>
+ <id>109474557777281024</id>
+ <text>My special friends. http://t.co/5JqNrmC</text>
+ <source>&lt;a href=&quot;http://twitter.com/download/android&quot; rel=&quot;nofollow&quot;&gt;Twitter for Android&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>0</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <possibly_sensitive>false</possibly_sensitive>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>145727626</id>
+ <name>Julie Del Carlo</name>
+ <screen_name>juliedelcarlo</screen_name>
+ <location></location>
+ <description></description>
+ <profile_image_url>http://a1.twimg.com/profile_images/1441125224/me_in_nyc_normal</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1441125224/me_in_nyc_normal</profile_image_url_https>
+ <url></url>
+ <protected>false</protected>
+ <followers_count>3823</followers_count>
+ <profile_background_color>FBC2CE</profile_background_color>
+ <profile_text_color>5A4A37</profile_text_color>
+ <profile_link_color>DD4969</profile_link_color>
+ <profile_sidebar_fill_color>FFC36E</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>F8F2E6</profile_sidebar_border_color>
+ <friends_count>586</friends_count>
+ <created_at>Wed May 19 18:32:50 +0000 2010</created_at>
+ <favourites_count>8</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a3.twimg.com/profile_background_images/319117928/xbad02b8c30148db3a7d53570a0acdbf.png</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/profile_background_images/319117928/xbad02b8c30148db3a7d53570a0acdbf.png</profile_background_image_url_https>
+ <profile_background_tile>true</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications></notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>false</verified>
+ <following></following>
+ <statuses_count>402</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent></follow_request_sent>
+ <listed_count>46</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url></expanded_url>
+ <display_url></display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Tue Aug 30 19:30:08 +0000 2011</created_at>
+ <id>108622547423199232</id>
+ <text>A very happy birthday to @che! #francisco http://t.co/LUjIvI6</text>
+ <source>&lt;a href=&quot;http://twitter.com/download/android&quot; rel=&quot;nofollow&quot;&gt;Twitter for Android&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>0</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <possibly_sensitive>false</possibly_sensitive>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>22824309</id>
+ <name>Rachael Horwitz</name>
+ <screen_name>RachaelRad</screen_name>
+ <location>San Francisco, CA</location>
+ <description>Twitter Communications. Short person. Loud voice. More than just a pizzabagel. </description>
+ <profile_image_url>http://a0.twimg.com/profile_images/1408115265/186227_587309531_8155668_n_normal.jpg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1408115265/186227_587309531_8155668_n_normal.jpg</profile_image_url_https>
+ <url></url>
+ <protected>false</protected>
+ <followers_count>868</followers_count>
+ <profile_background_color>665147</profile_background_color>
+ <profile_text_color>090700</profile_text_color>
+ <profile_link_color>000807</profile_link_color>
+ <profile_sidebar_fill_color>F7F9F9</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>EBD98D</profile_sidebar_border_color>
+ <friends_count>682</friends_count>
+ <created_at>Wed Mar 04 19:57:26 +0000 2009</created_at>
+ <favourites_count>51</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a3.twimg.com/profile_background_images/315104167/x9d3c16ade13b57b2abe466f3b154311.jpg</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/profile_background_images/315104167/x9d3c16ade13b57b2abe466f3b154311.jpg</profile_background_image_url_https>
+ <profile_background_tile>true</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications>false</notifications>
+ <geo_enabled>false</geo_enabled>
+ <verified>false</verified>
+ <following>false</following>
+ <statuses_count>2325</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent>false</follow_request_sent>
+ <listed_count>38</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url></expanded_url>
+ <display_url></display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Sat Sep 03 22:26:36 +0000 2011</created_at>
+ <id>110116509141045249</id>
+ <text>Greetings from Oregon! http://t.co/slpi8xr</text>
+ <source>&lt;a href=&quot;http://twitter.com/download/android&quot; rel=&quot;nofollow&quot;&gt;Twitter for Android&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>0</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <possibly_sensitive>false</possibly_sensitive>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>3446291</id>
+ <name>Rachel Bremer</name>
+ <screen_name>rbremer</screen_name>
+ <location>London</location>
+ <description>European communications manager for Twitter. That's enough for now.</description>
+ <profile_image_url>http://a2.twimg.com/profile_images/1370853870/RYB_headshot_sm_normal.jpg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1370853870/RYB_headshot_sm_normal.jpg</profile_image_url_https>
+ <url></url>
+ <protected>false</protected>
+ <followers_count>1666</followers_count>
+ <profile_background_color>9ae4e8</profile_background_color>
+ <profile_text_color>000000</profile_text_color>
+ <profile_link_color>0000ff</profile_link_color>
+ <profile_sidebar_fill_color>fdfcfc</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>e6e9e2</profile_sidebar_border_color>
+ <friends_count>557</friends_count>
+ <created_at>Wed Apr 04 18:09:44 +0000 2007</created_at>
+ <favourites_count>31</favourites_count>
+ <utc_offset>0</utc_offset>
+ <time_zone>London</time_zone>
+ <profile_background_image_url>http://a2.twimg.com/profile_background_images/4036889/Twitter.jpg</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/profile_background_images/4036889/Twitter.jpg</profile_background_image_url_https>
+ <profile_background_tile>true</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications>false</notifications>
+ <geo_enabled>false</geo_enabled>
+ <verified>false</verified>
+ <following>false</following>
+ <statuses_count>2556</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent>false</follow_request_sent>
+ <listed_count>36</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url></expanded_url>
+ <display_url></display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Sat Sep 03 09:42:04 +0000 2011</created_at>
+ <id>109924107214258176</id>
+ <text>On our way to Burghley for a day of horsey stuff...</text>
+ <source>&lt;a href=&quot;http://twitter.com/#!/download/iphone&quot; rel=&quot;nofollow&quot;&gt;Twitter for iPhone&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>0</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>14769591</id>
+ <name>Lynn Fox</name>
+ <screen_name>foxycar</screen_name>
+ <location></location>
+ <description>Twitter Comms. OH'ing myself.</description>
+ <profile_image_url>http://a2.twimg.com/profile_images/1134096793/bio_photo_small_normal.jpg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1134096793/bio_photo_small_normal.jpg</profile_image_url_https>
+ <url></url>
+ <protected>false</protected>
+ <followers_count>2702</followers_count>
+ <profile_background_color>9AE4E8</profile_background_color>
+ <profile_text_color>333333</profile_text_color>
+ <profile_link_color>0084B4</profile_link_color>
+ <profile_sidebar_fill_color>DDFFCC</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>BDDCAD</profile_sidebar_border_color>
+ <friends_count>969</friends_count>
+ <created_at>Wed May 14 05:26:31 +0000 2008</created_at>
+ <favourites_count>44</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a3.twimg.com/profile_background_images/143745093/Photo_102.jpg</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/profile_background_images/143745093/Photo_102.jpg</profile_background_image_url_https>
+ <profile_background_tile>true</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications>false</notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>false</verified>
+ <following>false</following>
+ <statuses_count>4058</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent>false</follow_request_sent>
+ <listed_count>198</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url></expanded_url>
+ <display_url></display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Sat Sep 03 16:17:36 +0000 2011</created_at>
+ <id>110023646487117824</id>
+ <text>Just showed &quot;Who's on first?&quot; to the boys. Classic.</text>
+ <source>web</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>0</retweet_count>
+ <retweeted>false</retweeted>
+ <geo/>
+ <coordinates/>
+ <place/>
+ <contributors/>
+ </status>
+</user>
+<user>
+ <id>14589956</id>
+ <name>kristen</name>
+ <screen_name>kh</screen_name>
+ <location>San Francisco</location>
+ <description>I'm a fun girl! Also, communications at Twitter</description>
+ <profile_image_url>http://a2.twimg.com/profile_images/1352279358/twitterpic_normal.jpg</profile_image_url>
+ <profile_image_url_https>https://si0.twimg.com/profile_images/1352279358/twitterpic_normal.jpg</profile_image_url_https>
+ <url>http://t.co/B6brkVp</url>
+ <protected>false</protected>
+ <followers_count>1825</followers_count>
+ <profile_background_color>9ae4e8</profile_background_color>
+ <profile_text_color>000000</profile_text_color>
+ <profile_link_color>B21515</profile_link_color>
+ <profile_sidebar_fill_color>e0ff92</profile_sidebar_fill_color>
+ <profile_sidebar_border_color>2DA530</profile_sidebar_border_color>
+ <friends_count>230</friends_count>
+ <created_at>Tue Apr 29 20:06:27 +0000 2008</created_at>
+ <favourites_count>210</favourites_count>
+ <utc_offset>-28800</utc_offset>
+ <time_zone>Pacific Time (US &amp; Canada)</time_zone>
+ <profile_background_image_url>http://a3.twimg.com/profile_background_images/8116121/Picture_1.png</profile_background_image_url>
+ <profile_background_image_url_https>https://si0.twimg.com/profile_background_images/8116121/Picture_1.png</profile_background_image_url_https>
+ <profile_background_tile>true</profile_background_tile>
+ <profile_use_background_image>true</profile_use_background_image>
+ <notifications></notifications>
+ <geo_enabled>true</geo_enabled>
+ <verified>false</verified>
+ <following></following>
+ <statuses_count>3946</statuses_count>
+ <lang>en</lang>
+ <contributors_enabled>false</contributors_enabled>
+ <follow_request_sent></follow_request_sent>
+ <listed_count>57</listed_count>
+ <show_all_inline_media>true</show_all_inline_media>
+ <default_profile>false</default_profile>
+ <default_profile_image>false</default_profile_image>
+ <expanded_url>http://about.me/kristenhawley</expanded_url>
+ <display_url>about.me/kristenhawley</display_url>
+ <entities>
+ <user_mentions/>
+ <urls/>
+ <hashtags/>
+ </entities>
+ <is_translator>false</is_translator>
+ <status>
+ <created_at>Sat Sep 03 22:21:16 +0000 2011</created_at>
+ <id>110115169379684353</id>
+ <text>Happy where I am, happy where I am going.</text>
+ <source>&lt;a href=&quot;http://twitter.com/#!/download/iphone&quot; rel=&quot;nofollow&quot;&gt;Twitter for iPhone&lt;/a&gt;</source>
+ <truncated>false</truncated>
+ <favorited>false</favorited>
+ <in_reply_to_status_id></in_reply_to_status_id>
+ <in_reply_to_user_id></in_reply_to_user_id>
+ <in_reply_to_screen_name></in_reply_to_screen_name>
+ <retweet_count>0</retweet_count>
+ <retweeted>false</retweeted>
+ <geo xmlns:georss="http://www.georss.org/georss">
+ <georss:point>38.47005683 -123.01459763</georss:point>
+ </geo>
+ <coordinates xmlns:georss="http://www.georss.org/georss">
+ <georss:point>38.47005683 -123.01459763</georss:point>
+ </coordinates>
+ <place xmlns:georss="http://www.georss.org/georss">
+ <id>aa352d4b3a8983c0</id>
+ <name>Monte Rio</name>
+ <full_name>Monte Rio, CA</full_name>
+ <place_type>city</place_type>
+ <url>http://api.twitter.com/1/geo/id/aa352d4b3a8983c0.json</url>
+ <attributes/>
+ <bounding_box>
+ <georss:polygon>38.455777 -123.03198 38.455777 -122.991321 38.476978 -122.991321 38.476978 -123.03198</georss:polygon>
+ </bounding_box>
+ <country code="US">United States</country>
+ </place>
+ <contributors/>
+ </status>
+</user>
+</users>
View
51 spec/twitter/client/activity_spec.rb
@@ -0,0 +1,51 @@
+=begin
+require 'helper'
+
+describe Twitter::Client do
+ context ".new" do
+ before do
+ @client = Twitter::Client.new
+ end
+
+ describe ".about_me" do
+
+ before do
+ stub_get("i/activity/about_me.json").
+ to_return(:body => fixture("about_me.json"), :headers => {:content_type => "application/json; charset=utf-8"})
+ end
+
+ it "should get the correct resource" do
+ @client.about_me
+ a_get("i/activity/about_me.json").
+ should have_been_made
+ end
+
+ it "should return activity about me" do
+ about_me = @client.about_me
+ about_me.first.action.should == "mention"
+ end
+
+ end
+
+ describe ".by_friends" do
+
+ before do
+ stub_get("i/activity/by_friends.json").
+ to_return(:body => fixture("by_friends.json"), :headers => {:content_type => "application/json; charset=utf-8"})
+ end
+
+ it "should get the correct resource" do
+ @client.by_friends
+ a_get("i/activity/by_friends.json").
+ should have_been_made
+ end
+
+ it "should return activity by friends" do
+ by_friends = @client.by_friends
+ by_friends.first.action.should == "favorite"
+ end
+
+ end
+ end
+end
+=end
View
48 spec/twitter/client/user_spec.rb
@@ -484,6 +484,54 @@
end
end
end
+
+ describe ".contributors" do
+
+ context "with a screen name passed" do
+
+ before do
+ stub_get("1/users/contributors.#{format}").
+ with(:query => {:screen_name => "sferik"}).
+ to_return(:body => fixture("contributors.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
+ end
+
+ it "should get the correct resource" do
+ @client.contributors("sferik")
+ a_get("1/users/contributors.#{format}").
+ with(:query => {:screen_name => "sferik"}).
+ should have_been_made
+ end
+
+ it "should return a user's contributors" do
+ contributors = @client.contributors("sferik")
+ contributors.should be_an Array
+ contributors.first.name.should == "Biz Stone"
+ end
+ end
+
+ context "without arguments passed" do
+
+ before do
+ @client.stub!(:get_screen_name).and_return('sferik')
+ stub_get("1/users/contributors.#{format}").
+ with(:query => {:screen_name => "sferik"}).
+ to_return(:body => fixture("contributors.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
+ end
+
+ it "should get the correct resource" do
+ @client.contributors
+ a_get("1/users/contributors.#{format}").
+ with(:query => {:screen_name => "sferik"}).
+ should have_been_made
+ end
+
+ it "should return a user's contributors" do
+ contributors = @client.contributors
+ contributors.should be_an Array
+ contributors.first.name.should == "Biz Stone"
+ end
+ end
+ end
end
end
end

0 comments on commit 1bb9f20

Please sign in to comment.