From f1a78ea183663e9853b4b5dc128dee9ce79391a3 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Wed, 31 Aug 2011 23:11:17 -0700 Subject: [PATCH] Add Statuses#media_timeline method --- lib/twitter/client/timeline.rb | 27 + lib/twitter/client/tweets.rb | 4 +- lib/twitter/client/urls.rb | 7 +- spec/fixtures/media_timeline.json | 1 + spec/fixtures/media_timeline.xml | 1046 ++++++++++++++++++++++++++ spec/twitter/client/timeline_spec.rb | 43 ++ 6 files changed, 1123 insertions(+), 5 deletions(-) create mode 100644 spec/fixtures/media_timeline.json create mode 100644 spec/fixtures/media_timeline.xml diff --git a/lib/twitter/client/timeline.rb b/lib/twitter/client/timeline.rb index 1378a3fc5..87a86b2a7 100644 --- a/lib/twitter/client/timeline.rb +++ b/lib/twitter/client/timeline.rb @@ -189,6 +189,33 @@ def retweets_of_me(options={}) response = get('statuses/retweets_of_me', options) format.to_s.downcase == 'xml' ? response['statuses'] : response end + + # Returns the 20 most recent images posted by the specified user + # + # @see https://support.twitter.com/articles/20169409 + # @note This method can only return up to the 100 most recent images. + # @note Images will not be returned from tweets posted before January 1, 2010. + # @rate_limited Yes + # @requires_authentication No unless the user whose timeline you're trying to view is protected + # @response_format `json` + # @response_format `xml` + # @overload media_timeline(user, options={}) + # @param user [Integer, String] A Twitter user ID or screen name. + # @param options [Hash] A customizable set of options. + # @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 200. + # @option options [Integer] :page Specifies the page of results to retrieve. + # @option options [Boolean] :filter Include possibly sensitive media when set to false, 'f' or 0. + # @option options [Boolean, String, Integer] :include_entities Include {https://dev.twitter.com/docs/tweet-entities Tweet Entities} when set to true, 't' or 1. + # @return [Array] + # @example Return the 20 most recent statuses posted by @sferik + # Twitter.media_timeline("sferik") + def media_timeline(*args) + options = args.last.is_a?(Hash) ? args.pop : {} + user = args.first || get_screen_name + merge_user_into_options!(user, options) + response = get('statuses/media_timeline', options) + format.to_s.downcase == 'xml' ? response['statuses'] : response + end end end end diff --git a/lib/twitter/client/tweets.rb b/lib/twitter/client/tweets.rb index 25966219b..247310df3 100644 --- a/lib/twitter/client/tweets.rb +++ b/lib/twitter/client/tweets.rb @@ -49,8 +49,8 @@ def update(status, options={}) # Updates with media the authenticating user's status # # @note A status update with text/media identical to the authenticating user's current status will NOT be ignored - # @authenticated true - # @rate_limited false + # @requires_authentication Yes + # @rate_limited No # @response_format `json` # @response_format `xml` # @param status [String] The text of your status update, up to 140 characters. diff --git a/lib/twitter/client/urls.rb b/lib/twitter/client/urls.rb index c39a98901..294c2d160 100644 --- a/lib/twitter/client/urls.rb +++ b/lib/twitter/client/urls.rb @@ -8,9 +8,10 @@ module Urls # @rate_limited Yes # @requires_authentication Yes # @response_format `json` - # @param urls [String] A list of shortened URLs - # @param options [Hash] A customizable set of options. - # @return [Hashie::Mash] A hash of URLs with the shortened URLs as the key + # @overload resolve(urls, options={}) + # @param urls [String] A list of shortened URLs + # @param options [Hash] A customizable set of options. + # @return [Hashie::Mash] A hash of URLs with the shortened URLs as the key # @example Return the canonical version of a URL shortened by Twitter # Twitter.resolve('http://t.co/uw5bn1w', 'http://t.co/dXvMz9i') # Twitter.resolve(['http://t.co/uw5bn1w', 'http://t.co/dXvMz9i']) # Same as above diff --git a/spec/fixtures/media_timeline.json b/spec/fixtures/media_timeline.json new file mode 100644 index 000000000..414edc3b9 --- /dev/null +++ b/spec/fixtures/media_timeline.json @@ -0,0 +1 @@ +[{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":6,"created_at":"Fri Aug 26 18:57:59 +0000 2011","in_reply_to_user_id":null,"id_str":"107164904741552128","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":null,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"source":"web","in_reply_to_screen_name":null,"id":107164904741552128,"in_reply_to_user_id_str":null,"place":{"name":"San Francisco","attributes":{},"full_name":"San Francisco, CA","bounding_box":{"coordinates":[[[-122.51368188,37.70813196],[-122.35845384,37.70813196],[-122.35845384,37.83245301],[-122.51368188,37.83245301]]],"type":"Polygon"},"url":"http:\/\/api.twitter.com\/1\/geo\/id\/5a110d312052166f.json","country_code":"US","country":"United States","id":"5a110d312052166f","place_type":"city"},"text":"Google is throwing up a question mark for Sunday's weather in Boston. At least they're being honest. http:\/\/t.co\/Jh7bAhS"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":1,"created_at":"Thu Aug 25 00:47:11 +0000 2011","in_reply_to_user_id":null,"id_str":"106528009388957697","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":null,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"source":"web","in_reply_to_screen_name":null,"id":106528009388957697,"in_reply_to_user_id_str":null,"place":{"name":"San Francisco","attributes":{},"full_name":"San Francisco, CA","bounding_box":{"coordinates":[[[-122.51368188,37.70813196],[-122.35845384,37.70813196],[-122.35845384,37.83245301],[-122.51368188,37.83245301]]],"type":"Polygon"},"url":"http:\/\/api.twitter.com\/1\/geo\/id\/5a110d312052166f.json","country_code":"US","country":"United States","id":"5a110d312052166f","place_type":"city"},"text":"for posterity http:\/\/t.co\/pRkVnhX"},{"contributors":null,"coordinates":{"coordinates":[-122.3934,37.7836],"type":"Point"},"retweeted":false,"retweet_count":0,"created_at":"Tue Aug 23 16:59:11 +0000 2011","in_reply_to_user_id":14103557,"id_str":"106047847782293504","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":106034932580753410,"geo":{"coordinates":[37.7836,-122.3934],"type":"Point"},"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"106034932580753410","source":"\u003Ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003EEchofon\u003C\/a\u003E","in_reply_to_screen_name":"joshaber","id":106047847782293504,"in_reply_to_user_id_str":"14103557","place":{"name":"South Beach","attributes":{},"full_name":"South Beach, San Francisco","bounding_box":{"coordinates":[[[-122.40348192,37.77752898],[-122.387436,37.77752898],[-122.387436,37.79448597],[-122.40348192,37.79448597]]],"type":"Polygon"},"url":"http:\/\/api.twitter.com\/1\/geo\/id\/5c92ab5379de3839.json","country_code":"US","country":"United States","id":"5c92ab5379de3839","place_type":"neighborhood"},"text":"@joshaber have you tried the iPad app? It looks like this: http:\/\/t.co\/618aQ7V"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":0,"created_at":"Sun Aug 21 16:38:24 +0000 2011","in_reply_to_user_id":null,"id_str":"105317838113345536","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":null,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"source":"web","in_reply_to_screen_name":null,"id":105317838113345536,"in_reply_to_user_id_str":null,"place":{"name":"San Francisco","attributes":{},"full_name":"San Francisco, CA","bounding_box":{"coordinates":[[[-122.51368188,37.70813196],[-122.35845384,37.70813196],[-122.35845384,37.83245301],[-122.51368188,37.83245301]]],"type":"Polygon"},"url":"http:\/\/api.twitter.com\/1\/geo\/id\/5a110d312052166f.json","country_code":"US","country":"United States","id":"5a110d312052166f","place_type":"city"},"text":"Current status: http:\/\/t.co\/DeyX72o"},{"contributors":null,"coordinates":{"coordinates":[-122.399983,37.788299],"type":"Point"},"retweeted":false,"retweet_count":0,"created_at":"Sat Aug 20 01:31:51 +0000 2011","in_reply_to_user_id":null,"id_str":"104727310984417280","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":null,"geo":{"coordinates":[37.788299,-122.399983],"type":"Point"},"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"source":"\u003Ca href=\"http:\/\/instagr.am\" rel=\"nofollow\"\u003EInstagram\u003C\/a\u003E","in_reply_to_screen_name":null,"id":104727310984417280,"in_reply_to_user_id_str":null,"place":{"name":"South Beach","attributes":{},"full_name":"South Beach, San Francisco","bounding_box":{"coordinates":[[[-122.40348192,37.77752898],[-122.387436,37.77752898],[-122.387436,37.79448597],[-122.40348192,37.79448597]]],"type":"Polygon"},"url":"http:\/\/api.twitter.com\/1\/geo\/id\/5c92ab5379de3839.json","country_code":"US","country":"United States","id":"5c92ab5379de3839","place_type":"neighborhood"},"text":"Getting a haircut from the CEO @ Code for America http:\/\/t.co\/xD1xYK9"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":0,"created_at":"Wed Aug 17 21:16:38 +0000 2011","in_reply_to_user_id":14103557,"id_str":"103938307297251329","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":103936484305940481,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"103936484305940481","source":"web","in_reply_to_screen_name":"joshaber","id":103938307297251329,"in_reply_to_user_id_str":"14103557","place":{"name":"San Francisco","attributes":{},"full_name":"San Francisco, CA","bounding_box":{"coordinates":[[[-122.51368188,37.70813196],[-122.35845384,37.70813196],[-122.35845384,37.83245301],[-122.51368188,37.83245301]]],"type":"Polygon"},"url":"http:\/\/api.twitter.com\/1\/geo\/id\/5a110d312052166f.json","country_code":"US","country":"United States","id":"5a110d312052166f","place_type":"city"},"text":"@joshaber @nuzz do you guys know each other? Your icons are remarkably similar: http:\/\/t.co\/7thQ2X7"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":0,"created_at":"Mon Aug 15 23:47:30 +0000 2011","in_reply_to_user_id":1260231,"id_str":"103251496338071552","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":103248132191694848,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"103248132191694848","source":"web","in_reply_to_screen_name":"joehewitt","id":103251496338071552,"in_reply_to_user_id_str":"1260231","place":{"name":"San Francisco","attributes":{},"full_name":"San Francisco, CA","bounding_box":{"coordinates":[[[-122.51368188,37.70813196],[-122.35845384,37.70813196],[-122.35845384,37.83245301],[-122.51368188,37.83245301]]],"type":"Polygon"},"url":"http:\/\/api.twitter.com\/1\/geo\/id\/5a110d312052166f.json","country_code":"US","country":"United States","id":"5a110d312052166f","place_type":"city"},"text":"@joehewitt Now I'm seeing this! http:\/\/t.co\/h4ygJag"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":0,"created_at":"Tue Jul 26 03:24:03 +0000 2011","in_reply_to_user_id":21866144,"id_str":"95695850344431616","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":95665223276560384,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"95665223276560384","source":"\u003Ca href=\"http:\/\/itunes.apple.com\/us\/app\/twitter\/id409789998?mt=12\" rel=\"nofollow\"\u003ETwitter for Mac\u003C\/a\u003E","in_reply_to_screen_name":"atogle","id":95695850344431616,"in_reply_to_user_id_str":"21866144","place":null,"text":"@atogle http:\/\/t.co\/mPkH5mb"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":0,"created_at":"Sat Jul 23 05:50:41 +0000 2011","in_reply_to_user_id":13334062,"id_str":"94645589299560449","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":94643126349729792,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"94643126349729792","source":"\u003Ca href=\"http:\/\/itunes.apple.com\/us\/app\/twitter\/id409789998?mt=12\" rel=\"nofollow\"\u003ETwitter for Mac\u003C\/a\u003E","in_reply_to_screen_name":"kevintwohy","id":94645589299560449,"in_reply_to_user_id_str":"13334062","place":null,"text":"@kevintwohy on second thought, I'm pretty sure it's pronounced like this: http:\/\/t.co\/QxJNv8Q"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":6,"created_at":"Sat Jul 23 05:29:14 +0000 2011","in_reply_to_user_id":null,"id_str":"94640192727683072","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":null,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"source":"\u003Ca href=\"http:\/\/itunes.apple.com\/us\/app\/twitter\/id409789998?mt=12\" rel=\"nofollow\"\u003ETwitter for Mac\u003C\/a\u003E","in_reply_to_screen_name":null,"id":94640192727683072,"in_reply_to_user_id_str":null,"place":null,"text":"Just discovered a new way to make accents in Mac OS X Lion. Just hold down the key and a menu appears! #protip http:\/\/t.co\/3HC456w"},{"contributors":null,"coordinates":{"coordinates":[-122.399983,37.788299],"type":"Point"},"retweeted":false,"retweet_count":1,"created_at":"Sat Jul 23 00:13:12 +0000 2011","in_reply_to_user_id":null,"id_str":"94560659072761856","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":null,"geo":{"coordinates":[37.788299,-122.399983],"type":"Point"},"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"source":"\u003Ca href=\"http:\/\/instagr.am\" rel=\"nofollow\"\u003EInstagram\u003C\/a\u003E","in_reply_to_screen_name":null,"id":94560659072761856,"in_reply_to_user_id_str":null,"place":{"name":"South Beach","attributes":{},"full_name":"South Beach, San Francisco","bounding_box":{"coordinates":[[[-122.40348192,37.77752898],[-122.387436,37.77752898],[-122.387436,37.79448597],[-122.40348192,37.79448597]]],"type":"Polygon"},"url":"http:\/\/api.twitter.com\/1\/geo\/id\/5c92ab5379de3839.json","country_code":"US","country":"United States","id":"5c92ab5379de3839","place_type":"neighborhood"},"text":"Among the first to taste @carlmalamud's new brew. Free as in freedom & free as in beer. @ Code for America http:\/\/instagr.am\/p\/IRUPK\/"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":0,"created_at":"Tue Jul 19 23:12:37 +0000 2011","in_reply_to_user_id":721623,"id_str":"93458246685294592","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":93442600509517824,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"93442600509517824","source":"\u003Ca href=\"http:\/\/itunes.apple.com\/us\/app\/twitter\/id409789998?mt=12\" rel=\"nofollow\"\u003ETwitter for Mac\u003C\/a\u003E","in_reply_to_screen_name":"scottsil","id":93458246685294592,"in_reply_to_user_id_str":"721623","place":null,"text":"@scottsil http:\/\/t.co\/QAUYQAa"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":0,"created_at":"Tue Jul 19 21:00:14 +0000 2011","in_reply_to_user_id":null,"id_str":"93424934822477824","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":null,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"source":"\u003Ca href=\"http:\/\/itunes.apple.com\/us\/app\/twitter\/id409789998?mt=12\" rel=\"nofollow\"\u003ETwitter for Mac\u003C\/a\u003E","in_reply_to_screen_name":null,"id":93424934822477824,"in_reply_to_user_id_str":null,"place":null,"text":"Code for America by the numbers: http:\/\/t.co\/D9TEprA"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":0,"created_at":"Sat Jul 16 18:38:43 +0000 2011","in_reply_to_user_id":10609,"id_str":"92302157730156544","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":92267018656550913,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"92267018656550913","source":"\u003Ca href=\"http:\/\/itunes.apple.com\/us\/app\/twitter\/id409789998?mt=12\" rel=\"nofollow\"\u003ETwitter for Mac\u003C\/a\u003E","in_reply_to_screen_name":"superamit","id":92302157730156544,"in_reply_to_user_id_str":"10609","place":null,"text":"@superamit I'd still like to see handwriting recognition. Apple has bad memories of Newton but I hope Google does it! http:\/\/t.co\/Gb92NnV"},{"contributors":null,"coordinates":null,"retweeted":false,"retweet_count":0,"created_at":"Thu Jul 14 04:27:50 +0000 2011","in_reply_to_user_id":1133971,"id_str":"91363248892416000","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":91291010021335041,"geo":null,"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"91291010021335041","source":"\u003Ca href=\"http:\/\/itunes.apple.com\/us\/app\/twitter\/id409789998?mt=12\" rel=\"nofollow\"\u003ETwitter for Mac\u003C\/a\u003E","in_reply_to_screen_name":"j3","id":91363248892416000,"in_reply_to_user_id_str":"1133971","place":null,"text":"@j3 you can add another one to the list. Just updated my Twitter bio to reflect my philosophy. :) http:\/\/t.co\/ZKV3Nzl"},{"contributors":null,"coordinates":{"coordinates":[-115.18757006,36.11699995],"type":"Point"},"retweeted":false,"retweet_count":0,"created_at":"Wed Jul 06 05:36:27 +0000 2011","in_reply_to_user_id":291,"id_str":"88481414600863744","user":{"notifications":null,"profile_use_background_image":true,"created_at":"Mon Jul 16 12:59:01 +0000 2007","protected":false,"default_profile_image":false,"statuses_count":4985,"profile_background_color":"000000","followers_count":1646,"name":"Erik Michaels-Ober","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","friends_count":419,"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","is_translator":false,"following":null,"utc_offset":-28800,"description":"\u201cIf you want something done, ask a busy person to do it. The more things you do, the more you can do.\u201d\r\n\u2014Lucille Ball","id_str":"7505382","follow_request_sent":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/162641967\/we_concept_bg2.png","profile_text_color":"333333","screen_name":"sferik","profile_sidebar_fill_color":"DDEEF6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1279736243\/Github_Square_normal.jpg","location":"San Francisco","profile_background_tile":false,"url":"https:\/\/github.com\/sferik","default_profile":false,"listed_count":89,"verified":false,"profile_link_color":"0084B4","show_all_inline_media":true,"contributors_enabled":false,"lang":"en","geo_enabled":true,"favourites_count":1700,"profile_sidebar_border_color":"C0DEED","id":7505382,"time_zone":"Pacific Time (US & Canada)"},"in_reply_to_status_id":88465733595570179,"geo":{"coordinates":[36.11699995,-115.18757006],"type":"Point"},"favorited":false,"truncated":false,"possibly_sensitive":false,"in_reply_to_status_id_str":"88465733595570179","source":"\u003Ca href=\"http:\/\/twitter.com\/#!\/download\/iphone\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E","in_reply_to_screen_name":"goldman","id":88481414600863744,"in_reply_to_user_id_str":"291","place":{"name":"Paradise","attributes":{},"full_name":"Paradise, NV","bounding_box":{"coordinates":[[[-115.208073,35.984787],[-115.059344,35.984787],[-115.059344,36.137126],[-115.208073,36.137126]]],"type":"Polygon"},"url":"http:\/\/api.twitter.com\/1\/geo\/id\/8fa6d7a33b83ef26.json","country_code":"US","country":"United States","id":"8fa6d7a33b83ef26","place_type":"city"},"text":"@goldman watching during the break http:\/\/t.co\/6698CCf"}] \ No newline at end of file diff --git a/spec/fixtures/media_timeline.xml b/spec/fixtures/media_timeline.xml new file mode 100644 index 000000000..76bfccd5e --- /dev/null +++ b/spec/fixtures/media_timeline.xml @@ -0,0 +1,1046 @@ + + + + Fri Aug 26 18:57:59 +0000 2011 + 107164904741552128 + Google is throwing up a question mark for Sunday's weather in Boston. At least they're being honest. http://t.co/Jh7bAhS + web + false + false + + + + 6 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + 5a110d312052166f + San Francisco + San Francisco, CA + city + http://api.twitter.com/1/geo/id/5a110d312052166f.json + + + 37.70813196 -122.51368188 37.70813196 -122.35845384 37.83245301 -122.35845384 37.83245301 -122.51368188 + + United States + + false + + + + Thu Aug 25 00:47:11 +0000 2011 + 106528009388957697 + for posterity http://t.co/pRkVnhX + web + false + false + + + + 1 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + 5a110d312052166f + San Francisco + San Francisco, CA + city + http://api.twitter.com/1/geo/id/5a110d312052166f.json + + + 37.70813196 -122.51368188 37.70813196 -122.35845384 37.83245301 -122.35845384 37.83245301 -122.51368188 + + United States + + false + + + + Tue Aug 23 16:59:11 +0000 2011 + 106047847782293504 + @joshaber have you tried the iPad app? It looks like this: http://t.co/618aQ7V + <a href="http://www.echofon.com/" rel="nofollow">Echofon</a> + false + false + 106034932580753410 + 14103557 + joshaber + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + 37.7836 -122.3934 + + + 37.7836 -122.3934 + + + 5c92ab5379de3839 + South Beach + South Beach, San Francisco + neighborhood + http://api.twitter.com/1/geo/id/5c92ab5379de3839.json + + + 37.77752898 -122.40348192 37.77752898 -122.387436 37.79448597 -122.387436 37.79448597 -122.40348192 + + United States + + false + + + + Sun Aug 21 16:38:24 +0000 2011 + 105317838113345536 + Current status: http://t.co/DeyX72o + web + false + false + + + + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + 5a110d312052166f + San Francisco + San Francisco, CA + city + http://api.twitter.com/1/geo/id/5a110d312052166f.json + + + 37.70813196 -122.51368188 37.70813196 -122.35845384 37.83245301 -122.35845384 37.83245301 -122.51368188 + + United States + + false + + + + Sat Aug 20 01:31:51 +0000 2011 + 104727310984417280 + Getting a haircut from the CEO @ Code for America http://t.co/xD1xYK9 + <a href="http://instagr.am" rel="nofollow">Instagram</a> + false + false + + + + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + 37.788299 -122.399983 + + + 37.788299 -122.399983 + + + 5c92ab5379de3839 + South Beach + South Beach, San Francisco + neighborhood + http://api.twitter.com/1/geo/id/5c92ab5379de3839.json + + + 37.77752898 -122.40348192 37.77752898 -122.387436 37.79448597 -122.387436 37.79448597 -122.40348192 + + United States + + false + + + + Wed Aug 17 21:16:38 +0000 2011 + 103938307297251329 + @joshaber @nuzz do you guys know each other? Your icons are remarkably similar: http://t.co/7thQ2X7 + web + false + false + 103936484305940481 + 14103557 + joshaber + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + 5a110d312052166f + San Francisco + San Francisco, CA + city + http://api.twitter.com/1/geo/id/5a110d312052166f.json + + + 37.70813196 -122.51368188 37.70813196 -122.35845384 37.83245301 -122.35845384 37.83245301 -122.51368188 + + United States + + false + + + + Mon Aug 15 23:47:30 +0000 2011 + 103251496338071552 + @joehewitt Now I'm seeing this! http://t.co/h4ygJag + web + false + false + 103248132191694848 + 1260231 + joehewitt + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + 5a110d312052166f + San Francisco + San Francisco, CA + city + http://api.twitter.com/1/geo/id/5a110d312052166f.json + + + 37.70813196 -122.51368188 37.70813196 -122.35845384 37.83245301 -122.35845384 37.83245301 -122.51368188 + + United States + + false + + + + Tue Jul 26 03:24:03 +0000 2011 + 95695850344431616 + @atogle http://t.co/mPkH5mb + <a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a> + false + false + 95665223276560384 + 21866144 + atogle + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + false + + + + Sat Jul 23 05:50:41 +0000 2011 + 94645589299560449 + @kevintwohy on second thought, I'm pretty sure it's pronounced like this: http://t.co/QxJNv8Q + <a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a> + false + false + 94643126349729792 + 13334062 + kevintwohy + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + false + + + + Sat Jul 23 05:29:14 +0000 2011 + 94640192727683072 + Just discovered a new way to make accents in Mac OS X Lion. Just hold down the key and a menu appears! #protip http://t.co/3HC456w + <a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a> + false + false + + + + 6 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + false + + + + Sat Jul 23 00:13:12 +0000 2011 + 94560659072761856 + Among the first to taste @carlmalamud's new brew. Free as in freedom & free as in beer. @ Code for America http://instagr.am/p/IRUPK/ + <a href="http://instagr.am" rel="nofollow">Instagram</a> + false + false + + + + 1 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + 37.788299 -122.399983 + + + 37.788299 -122.399983 + + + 5c92ab5379de3839 + South Beach + South Beach, San Francisco + neighborhood + http://api.twitter.com/1/geo/id/5c92ab5379de3839.json + + + 37.77752898 -122.40348192 37.77752898 -122.387436 37.79448597 -122.387436 37.79448597 -122.40348192 + + United States + + false + + + + Tue Jul 19 23:12:37 +0000 2011 + 93458246685294592 + @scottsil http://t.co/QAUYQAa + <a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a> + false + false + 93442600509517824 + 721623 + scottsil + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + false + + + + Tue Jul 19 21:00:14 +0000 2011 + 93424934822477824 + Code for America by the numbers: http://t.co/D9TEprA + <a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a> + false + false + + + + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + false + + + + Sat Jul 16 18:38:43 +0000 2011 + 92302157730156544 + @superamit I'd still like to see handwriting recognition. Apple has bad memories of Newton but I hope Google does it! http://t.co/Gb92NnV + <a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a> + false + false + 92267018656550913 + 10609 + superamit + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + false + + + + Thu Jul 14 04:27:50 +0000 2011 + 91363248892416000 + @j3 you can add another one to the list. Just updated my Twitter bio to reflect my philosophy. :) http://t.co/ZKV3Nzl + <a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a> + false + false + 91291010021335041 + 1133971 + j3 + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + + + false + + + + Wed Jul 06 05:36:27 +0000 2011 + 88481414600863744 + @goldman watching during the break http://t.co/6698CCf + <a href="http://twitter.com/#!/download/iphone" rel="nofollow">Twitter for iPhone</a> + false + false + 88465733595570179 + 291 + goldman + 0 + false + + 7505382 + Erik Michaels-Ober + sferik + San Francisco + “If you want something done, ask a busy person to do it. The more things you do, the more you can do.” +—Lucille Ball + http://a2.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://si0.twimg.com/profile_images/1279736243/Github_Square_normal.jpg + https://github.com/sferik + false + 1646 + 000000 + 333333 + 0084B4 + DDEEF6 + C0DEED + 419 + Mon Jul 16 12:59:01 +0000 2007 + 1700 + -28800 + Pacific Time (US & Canada) + http://a0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + https://si0.twimg.com/profile_background_images/162641967/we_concept_bg2.png + false + true + + true + false + + 4985 + en + false + + 89 + true + false + false + false + + + 36.11699995 -115.18757006 + + + 36.11699995 -115.18757006 + + + 8fa6d7a33b83ef26 + Paradise + Paradise, NV + city + http://api.twitter.com/1/geo/id/8fa6d7a33b83ef26.json + + + 35.984787 -115.208073 35.984787 -115.059344 36.137126 -115.059344 36.137126 -115.208073 + + United States + + false + + + diff --git a/spec/twitter/client/timeline_spec.rb b/spec/twitter/client/timeline_spec.rb index d65f3433c..f7efd610f 100644 --- a/spec/twitter/client/timeline_spec.rb +++ b/spec/twitter/client/timeline_spec.rb @@ -197,6 +197,49 @@ statuses.first.text.should == "Ruby is the best programming language for hiding the ugly bits." end end + + describe ".media_timeline" do + + context "with screen name passed" do + + before do + stub_get("statuses/media_timeline.#{format}"). + with(:query => {:screen_name => "sferik"}). + to_return(:body => fixture("media_timeline.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"}) + end + + it "should get the correct resource" do + @client.media_timeline("sferik") + a_get("statuses/media_timeline.#{format}"). + with(:query => {:screen_name => "sferik"}). + should have_been_made + end + + it "should return the 20 most recent images posted by the user specified by screen name or user id" do + statuses = @client.media_timeline("sferik") + statuses.should be_an Array + statuses.first.text.should == "Google is throwing up a question mark for Sunday's weather in Boston. At least they're being honest. http://t.co/Jh7bAhS" + end + + end + + context "without screen name passed" do + + before do + @client.stub!(:get_screen_name).and_return('sferik') + stub_get("statuses/media_timeline.#{format}"). + with(:query => {:screen_name => "sferik"}). + to_return(:body => fixture("media_timeline.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"}) + end + + it "should get the correct resource" do + @client.media_timeline + a_get("statuses/media_timeline.#{format}"). + with(:query => {:screen_name => "sferik"}). + should have_been_made + end + end + end end end end