From 327724b8edcefaf726d9d92c7e9d8f5380003097 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Sun, 4 Sep 2011 14:25:21 -0400 Subject: [PATCH] Add Search#search method --- lib/twitter/client/search.rb | 34 +++++++++++++++++------ lib/twitter/connection.rb | 2 +- lib/twitter/request.rb | 2 +- spec/fixtures/phoenix_search.phoenix | 1 + spec/twitter/client/search_spec.rb | 41 +++++++++++++++++++++------- 5 files changed, 60 insertions(+), 20 deletions(-) create mode 100644 spec/fixtures/phoenix_search.phoenix diff --git a/lib/twitter/client/search.rb b/lib/twitter/client/search.rb index 6c6c1ed48..d51524141 100644 --- a/lib/twitter/client/search.rb +++ b/lib/twitter/client/search.rb @@ -2,7 +2,7 @@ module Twitter class Client # Defines methods related to Search module Search - # Returns recent images related to a query + # Returns recent statuses that contain images related to a query # # @note Undocumented # @rate_limited Yes @@ -14,14 +14,14 @@ module Search # @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 100. # @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1. # @return [Array] An array of statuses that contain images - # @example Return recent images related to twitter - # Twitter.image_facets('twitter') - def image_facets(q, options={}) + # @example Return recent statuses that contain images related to a query + # Twitter.images('twitter') + def images(q, options={}) response = get('i/search/image_facets', options.merge(:q => q)) format.to_s.downcase == 'xml' ? response['statuses'] : response end - # Returns recent videos related to a query + # Returns recent statuses that contain videos related to a query # # @note Undocumented # @rate_limited Yes @@ -33,12 +33,30 @@ def image_facets(q, options={}) # @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 100. # @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1. # @return [Array] An array of statuses that contain videos - # @example Return recent videos related to twitter - # Twitter.video_facets('twitter') - def video_facets(q, options={}) + # @example Return recent statuses that contain videos related to a query + # Twitter.videos('twitter') + def videos(q, options={}) response = get('i/search/video_facets', options.merge(:q => q)) format.to_s.downcase == 'xml' ? response['statuses'] : response end + + # Returns recent statuses related to a query with images and videos embedded + # + # @note Undocumented + # @rate_limited Yes + # @requires_authentication No + # @response_format `json` + # @response_format `xml` + # @param q [String] A search term. + # @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 100. + # @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1. + # @return [Array] An array of statuses that contain videos + # @example Return recent statuses related to twitter with images and videos embedded + # Twitter.search('twitter') + def search(q, options={}) + response = get('phoenix_search', options.merge(:q => q), :phoenix)['statuses'] + end end end end diff --git a/lib/twitter/connection.rb b/lib/twitter/connection.rb index 13fbd4264..ae7607e20 100644 --- a/lib/twitter/connection.rb +++ b/lib/twitter/connection.rb @@ -34,7 +34,7 @@ def connection(format=format, temp_api_endpoint=nil) builder.use Faraday::Request::Gateway, gateway if gateway builder.use Faraday::Response::RaiseHttp4xx case format.to_s.downcase - when 'json' + when 'json', 'phoenix' builder.use Faraday::Response::Mashify builder.use Faraday::Response::ParseJson when 'xml' diff --git a/lib/twitter/request.rb b/lib/twitter/request.rb index 4db76b630..321a07c0e 100644 --- a/lib/twitter/request.rb +++ b/lib/twitter/request.rb @@ -38,7 +38,7 @@ def request(method, path, options, format, temp_api_endpoint=nil) def formatted_path(path, format) case format.to_s.downcase - when 'json', 'xml' + when 'json', 'phoenix', 'xml' [path, format].compact.join('.') when 'raw' [path, Twitter.format].compact.join('.') diff --git a/spec/fixtures/phoenix_search.phoenix b/spec/fixtures/phoenix_search.phoenix new file mode 100644 index 000000000..99e5ded74 --- /dev/null +++ b/spec/fixtures/phoenix_search.phoenix @@ -0,0 +1 @@ +{"statuses":[{"id_str":"110059784971096066","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"DDEEF6","protected":false,"id_str":"66561957","notifications":false,"profile_background_tile":false,"screen_name":"therealzooeyd","name":"zooey deschanel","listed_count":9165,"location":"somewhere pretty awesome...","show_all_inline_media":false,"contributors_enabled":false,"following":true,"geo_enabled":false,"utc_offset":-28800,"profile_link_color":"0084B4","description":"where do I begin?","profile_sidebar_border_color":"C0DEED","url":"http:\/\/www.sheandhim.com","time_zone":"Pacific Time (US & Canada)","default_profile_image":false,"statuses_count":1864,"profile_use_background_image":true,"verified":true,"favourites_count":2,"friends_count":355,"profile_background_color":"C0DEED","is_translator":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/178865861\/Zooey_12.jpg","created_at":"Tue Aug 18 01:55:35 +0000 2009","followers_count":561263,"default_profile":false,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/178865861\/Zooey_12.jpg","id":66561957,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1284004687\/zuzu_and_caleb_at_the_camera_normal.jpg","profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1284004687\/zuzu_and_caleb_at_the_camera_normal.jpg"},"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 18:41:12 +0000 2011","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":"100+","id":110059784971096066,"place":null,"text":"looking at twitter trends just makes me realize how little i really understand about mankind.","result_category":"popular"},{"id_str":"110102452983963648","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"DDEEF6","protected":false,"id_str":"91720294","notifications":false,"profile_background_tile":true,"screen_name":"I_am_Chicago1","name":"Cortney Bell ","listed_count":10,"location":"#Pvnation ","show_all_inline_media":false,"contributors_enabled":false,"following":true,"geo_enabled":true,"utc_offset":-21600,"profile_link_color":"0084B4","description":"follow me ... and @ me for more info about me ... i love talking ","default_profile":false,"profile_sidebar_border_color":"C0DEED","url":null,"time_zone":"Central Time (US & Canada)","default_profile_image":false,"statuses_count":15916,"profile_use_background_image":true,"verified":false,"favourites_count":30,"friends_count":1382,"profile_background_color":"C0DEED","is_translator":false,"profile_background_image_url":"http:\/\/a2.twimg.com\/profile_background_images\/313661881\/230924_10150575103000392_886675391_18447865_3396753_n.jpg","created_at":"Sun Nov 22 04:12:38 +0000 2009","followers_count":1455,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/313661881\/230924_10150575103000392_886675391_18447865_3396753_n.jpg","id":91720294,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1500420758\/26726_10150132149850392_886675391_11511035_325929_n_normal.jpg","profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1500420758\/26726_10150132149850392_886675391_11511035_325929_n_normal.jpg"},"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":"Sat Sep 03 21:30:45 +0000 2011","entities":{"user_mentions":[],"urls":[],"media":[{"type":"photo","id_str":"110102452988157952","display_url":"pic.twitter.com\/tImqsGy","expanded_url":"http:\/\/twitter.com\/I_am_Chicago1\/status\/110102452983963648\/photo\/1","media_url_https":"https:\/\/p.twimg.com\/AYcpmP9CIAAJpsR.jpg","url":"http:\/\/t.co\/tImqsGy","indices":[15,34],"sizes":{"small":{"h":98,"w":130,"resize":"fit"},"large":{"h":98,"w":130,"resize":"fit"},"thumb":{"h":98,"w":130,"resize":"crop"},"medium":{"h":98,"w":130,"resize":"fit"}},"id":110102452988157952,"media_url":"http:\/\/p.twimg.com\/AYcpmP9CIAAJpsR.jpg"}],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102452983963648,"place":null,"text":"this shit Cray http:\/\/t.co\/tImqsGy","result_category":"recent"},{"id_str":"110102452937834496","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"F3F3F3","protected":false,"id_str":"29248413","notifications":false,"profile_background_tile":false,"screen_name":"trinbeean","name":"Trina","listed_count":0,"location":"Everywhere I wanna be","show_all_inline_media":false,"contributors_enabled":false,"following":true,"geo_enabled":false,"utc_offset":-18000,"profile_link_color":"990000","description":"Wats UNDERSTOOD dnt gota be EXPLAINED!!","profile_sidebar_border_color":"DFDFDF","url":null,"time_zone":"Eastern Time (US & Canada)","default_profile_image":false,"default_profile":false,"statuses_count":13064,"profile_use_background_image":true,"verified":false,"favourites_count":8,"friends_count":220,"profile_background_color":"EBEBEB","is_translator":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/images\/themes\/theme7\/bg.gif","created_at":"Mon Apr 06 17:34:14 +0000 2009","followers_count":133,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme7\/bg.gif","id":29248413,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1493286924\/trinbeean_normal.jpg","profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1493286924\/trinbeean_normal.jpg"},"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:\/\/levelupstudio.com\" rel=\"nofollow\"\u003EPlume\u00a0\u00a0\u003C\/a\u003E","created_at":"Sat Sep 03 21:30:45 +0000 2011","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102452937834496,"place":null,"text":"Damn my phone n my twitter ain't jumped all day...nobodys fukkin wit me?! Smh","result_category":"recent"},{"id_str":"110102452656816129","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"DDEEF6","protected":false,"id_str":"315338037","notifications":null,"profile_background_tile":false,"screen_name":"h1940","name":"Hans Greup","default_profile":true,"listed_count":0,"location":null,"show_all_inline_media":false,"contributors_enabled":false,"following":null,"geo_enabled":false,"utc_offset":null,"profile_link_color":"0084B4","description":null,"profile_sidebar_border_color":"C0DEED","url":null,"time_zone":null,"default_profile_image":true,"statuses_count":1,"profile_use_background_image":true,"verified":false,"favourites_count":0,"friends_count":3,"profile_background_color":"C0DEED","is_translator":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","created_at":"Sat Jun 11 18:05:53 +0000 2011","followers_count":0,"follow_request_sent":null,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","id":315338037,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/sticky\/default_profile_images\/default_profile_0_normal.png","profile_image_url":"http:\/\/a3.twimg.com\/sticky\/default_profile_images\/default_profile_0_normal.png"},"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:\/\/mobile.twitter.com\" rel=\"nofollow\"\u003EMobile Web\u003C\/a\u003E","created_at":"Sat Sep 03 21:30:44 +0000 2011","entities":{"user_mentions":[],"urls":[{"display_url":"goo.gl\/TDs5Y?kylo","expanded_url":"http:\/\/goo.gl\/TDs5Y?kylo","url":"http:\/\/t.co\/9EhL4KF","indices":[53,72]}],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102452656816129,"place":null,"text":"I just made $577 today working a few hour from home http:\/\/t.co\/9EhL4KF","result_category":"recent"},{"id_str":"110102452191248384","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"f6ce93","protected":false,"id_str":"243420776","notifications":false,"profile_background_tile":false,"screen_name":"DenisFariias","name":" Denis Farias","default_profile":false,"listed_count":0,"location":"","show_all_inline_media":false,"contributors_enabled":false,"following":true,"geo_enabled":false,"utc_offset":null,"profile_link_color":"825421","description":"tourino, shato pra caralho, amig\u00e3o, olhos verdes, americano e vascaino fanatico, futebol, forro, festa... Msn: denis_fariaschagas@hotmail.com \r\n","profile_sidebar_border_color":"000000","url":null,"time_zone":null,"default_profile_image":false,"statuses_count":995,"profile_use_background_image":true,"verified":false,"favourites_count":1,"friends_count":145,"profile_background_color":"ffffff","is_translator":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/324394183\/wall-3.br.jpg","created_at":"Thu Jan 27 00:40:08 +0000 2011","followers_count":192,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/324394183\/wall-3.br.jpg","id":243420776,"profile_text_color":"000000","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1495336726\/Denis99_normal.jpg","profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1495336726\/Denis99_normal.jpg"},"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:\/\/www.twitrbackgrounds.com\" rel=\"nofollow\"\u003Etwitrbackgroundsdotcom\u003C\/a\u003E","created_at":"Sat Sep 03 21:30:44 +0000 2011","entities":{"user_mentions":[],"urls":[{"display_url":"TwitterBackgrounds.com","expanded_url":"http:\/\/www.TwitterBackgrounds.com","url":"http:\/\/t.co\/Yxg7c6U","indices":[62,81]}],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102452191248384,"place":null,"text":"Just changed my twitter background, check it out! Found it at http:\/\/t.co\/Yxg7c6U on Saturday 02:24:36 PM","result_category":"recent"},{"id_str":"110102451520147456","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"ffffff","protected":false,"id_str":"244369383","notifications":false,"profile_background_tile":true,"screen_name":"ryanruggi","name":"Ryan Ruggiero","listed_count":6,"location":"Atlanta, Georgia","show_all_inline_media":true,"contributors_enabled":false,"following":false,"geo_enabled":true,"utc_offset":-18000,"profile_link_color":"32c232","description":"Just livin' it up like it's the weekend. ","profile_sidebar_border_color":"ffffff","url":null,"time_zone":"Eastern Time (US & Canada)","default_profile_image":false,"statuses_count":7023,"profile_use_background_image":true,"default_profile":false,"verified":false,"favourites_count":15,"friends_count":682,"profile_background_color":"fafafa","is_translator":false,"profile_background_image_url":"http:\/\/a2.twimg.com\/profile_background_images\/316502774\/pattern-background.jpg","created_at":"Sat Jan 29 04:35:01 +0000 2011","followers_count":640,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/316502774\/pattern-background.jpg","id":244369383,"profile_text_color":"46454d","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1523046286\/image_normal.jpg","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1523046286\/image_normal.jpg"},"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":"Sat Sep 03 21:30:46 +0000 2011","entities":{"user_mentions":[],"urls":[],"media":[{"type":"photo","id_str":"110102451524341761","display_url":"pic.twitter.com\/3Bmz6qj","expanded_url":"http:\/\/twitter.com\/ryanruggi\/status\/110102451520147456\/photo\/1","media_url_https":"https:\/\/p.twimg.com\/AYcpmKgCEAEnDeT.png","url":"http:\/\/t.co\/3Bmz6qj","indices":[60,79],"sizes":{"small":{"h":262,"w":340,"resize":"fit"},"large":{"h":602,"w":780,"resize":"fit"},"thumb":{"h":150,"w":150,"resize":"crop"},"medium":{"h":463,"w":600,"resize":"fit"}},"id":110102451524341761,"media_url":"http:\/\/p.twimg.com\/AYcpmKgCEAEnDeT.png"}],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102451520147456,"place":null,"text":"Well this'll be fun, it's heading straight for Atlanta! O.o http:\/\/t.co\/3Bmz6qj","result_category":"recent"},{"id_str":"110102450790338560","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"DDEEF6","protected":false,"id_str":"363396957","notifications":false,"profile_background_tile":false,"screen_name":"MarixoliitaC","name":"maria fernanda","listed_count":0,"location":"","show_all_inline_media":false,"contributors_enabled":false,"following":false,"geo_enabled":false,"utc_offset":null,"profile_link_color":"0084B4","description":"","profile_sidebar_border_color":"C0DEED","url":"http:\/\/www.facebook.com\/marixolita.bonita","time_zone":null,"default_profile_image":false,"statuses_count":33,"profile_use_background_image":true,"verified":false,"favourites_count":0,"friends_count":9,"profile_background_color":"C0DEED","is_translator":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","created_at":"Sun Aug 28 01:07:24 +0000 2011","followers_count":0,"default_profile":true,"follow_request_sent":false,"lang":"es","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","id":363396957,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1517730160\/275837_100002268478641_2446262_n_normal.jpg","profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1517730160\/275837_100002268478641_2446262_n_normal.jpg"},"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 21:30:44 +0000 2011","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102450790338560,"place":null,"text":"dia perfecto para vicear full en twitter xD","result_category":"recent"},{"id_str":"110102450614181888","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"","protected":false,"id_str":"351563676","notifications":false,"profile_background_tile":true,"screen_name":"vemquicandu","name":"Capit\u00e3o Caverna","default_profile":false,"listed_count":263,"location":"no beco no buteco de um bar","show_all_inline_media":false,"contributors_enabled":false,"following":true,"geo_enabled":false,"utc_offset":-14400,"profile_link_color":"de0909","description":"ex prostituta, ex presidiario, ex dorgado. AGORA SOU RYCO E MINHA VIDA \u00c9 UM LUXO! e ainda tinha gente que fala que eu to na pior. ps: s\u00f3 aceito com scrap u_\u00fa kk","profile_sidebar_border_color":"fafafa","url":null,"time_zone":"Santiago","default_profile_image":false,"statuses_count":2229,"profile_use_background_image":true,"verified":false,"favourites_count":281,"friends_count":452,"profile_background_color":"f7f9fa","is_translator":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/308785326\/avenged-seven-fold.jpg","created_at":"Tue Aug 09 12:38:31 +0000 2011","followers_count":976,"follow_request_sent":false,"lang":"pt","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/308785326\/avenged-seven-fold.jpg","id":351563676,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1495621875\/lilipe_normal.jpg","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1495621875\/lilipe_normal.jpg"},"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 21:30:44 +0000 2011","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102450614181888,"place":null,"text":"twitter ta parad\u00e3o","result_category":"recent"},{"id_str":"110102450559651841","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"DDEEF6","protected":false,"id_str":"360252951","notifications":null,"profile_background_tile":false,"screen_name":"shesignorant","name":"Nan","default_profile":true,"listed_count":0,"location":"","show_all_inline_media":false,"contributors_enabled":false,"following":null,"geo_enabled":false,"utc_offset":null,"profile_link_color":"0084B4","description":"","profile_sidebar_border_color":"C0DEED","url":null,"time_zone":null,"default_profile_image":false,"statuses_count":1048,"profile_use_background_image":true,"verified":false,"favourites_count":0,"friends_count":2,"profile_background_color":"C0DEED","is_translator":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","created_at":"Mon Aug 22 22:57:18 +0000 2011","followers_count":1,"follow_request_sent":null,"lang":"pt","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","id":360252951,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1522354181\/hees_normal.png","profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1522354181\/hees_normal.png"},"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:\/\/www.tweetdeck.com\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E","created_at":"Sat Sep 03 21:30:44 +0000 2011","entities":{"user_mentions":[{"name":"Fanfic Obsession","screen_name":"fanficobsession","id_str":"89702318","indices":[10,26],"id":89702318},{"name":"Taste Of Ink Store","screen_name":"tasteofinkstore","id_str":"45738466","indices":[31,47],"id":45738466}],"urls":[{"display_url":"kingo.to\/MJx","expanded_url":"http:\/\/kingo.to\/MJx","url":"http:\/\/t.co\/MFstcIo","indices":[84,103]}],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102450559651841,"place":null,"text":"Eu sigo o @fanficobsession e a @tasteofinkstore e quero ganhar o Kit 01 de bottons! http:\/\/t.co\/MFstcIo twitter","result_category":"recent"},{"id_str":"110102450240888832","in_reply_to_status_id":110101691038306304,"truncated":false,"user":{"profile_sidebar_fill_color":"ffffff","protected":false,"id_str":"340238592","notifications":null,"profile_background_tile":true,"screen_name":"AnaisWatson","name":"Ana\u00efs Gomez-Watson \u262e","default_profile":false,"listed_count":1,"location":"#Poufsoufflepower \u03df","show_all_inline_media":false,"contributors_enabled":false,"following":null,"geo_enabled":true,"utc_offset":-10800,"profile_link_color":"f07b5d","description":"Ana\u00efs 16 yo, Jenny is my love #heartTeam. Being myself in that fake world. Second twitter ; Potter head , selenator and belieber. Until the very end \u03df","profile_sidebar_border_color":"e8e8e8","url":"http:\/\/iownyournight.tumblr.com\/","time_zone":"Greenland","default_profile_image":false,"statuses_count":1160,"profile_use_background_image":true,"verified":false,"favourites_count":3,"friends_count":24,"profile_background_color":"c0deed","is_translator":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/323685091\/tumblr_looi6k1Vn01qderwco1_500.jpg","created_at":"Fri Jul 22 11:07:30 +0000 2011","followers_count":27,"follow_request_sent":null,"lang":"fr","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/323685091\/tumblr_looi6k1Vn01qderwco1_500.jpg","id":340238592,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1525293982\/for_twitter_1_normal.png","profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1525293982\/for_twitter_1_normal.png"},"favorited":false,"in_reply_to_status_id_str":"110101691038306304","geo":null,"in_reply_to_screen_name":"Poufsouffle_","in_reply_to_user_id_str":"349194144","coordinates":null,"in_reply_to_user_id":349194144,"source":"\u003Ca href=\"http:\/\/mobile.twitter.com\" rel=\"nofollow\"\u003EMobile Web\u003C\/a\u003E","created_at":"Sat Sep 03 21:30:44 +0000 2011","entities":{"user_mentions":[{"name":"Pomona Chourave","screen_name":"Poufsouffle_","id_str":"349194144","indices":[0,13],"id":349194144}],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102450240888832,"place":null,"text":"@Poufsouffle_ - TC, le nombre de followers qui importe tant. \u00c7a m'\u00e9nerve aussi d'o\u00f9 mon recul sur un twitter plus personnel -","result_category":"recent"},{"truncated":false,"favorited":false,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"in_reply_to_screen_name":null,"in_reply_to_user_id_str":null,"in_reply_to_user_id":null,"contributors":null,"geo":null,"user":{"listed_count":4,"protected":false,"show_all_inline_media":true,"contributors_enabled":false,"geo_enabled":true,"notifications":false,"profile_link_color":"0099CC","screen_name":"Alilicita","name":"Ali Le\u00f3n D\u00edaz","profile_sidebar_border_color":"fff8ad","location":"Lambar\u00e9-Paraguay","following":true,"time_zone":"Santiago","utc_offset":-14400,"description":"26\/ABR, Tauro, Lic. en Administraci\u00f3n de Empresas, #CCP1912 y...no tengo nada contra ellos,la rabia es contra el tiempo por ponerte junto a mi..tarde..","default_profile_image":false,"statuses_count":6526,"profile_use_background_image":true,"url":"http:\/\/www.facebook.com\/ali.leondiaz","verified":false,"favourites_count":4,"friends_count":324,"profile_background_color":"FFF04D","is_translator":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/312913794\/felinos__56_.jpg","followers_count":260,"follow_request_sent":false,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/312913794\/felinos__56_.jpg","created_at":"Mon Jan 25 15:35:59 +0000 2010","profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1515384610\/Foto0224_normal.jpg","lang":"es","profile_sidebar_fill_color":"f6ffd1","id":108322421,"id_str":"108322421","default_profile":false,"profile_background_tile":true,"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1515384610\/Foto0224_normal.jpg"},"retweeted":false,"retweet_count":0,"coordinates":null,"source":"\u003Ca href=\"http:\/\/twitdat.com\" rel=\"nofollow\"\u003Etwitdat\u003C\/a\u003E","created_at":"Sat Sep 03 21:30:44 +0000 2011","entities":{"user_mentions":[{"name":"TwitDat","screen_name":"twitdatcom","indices":[56,67],"id":253174959,"id_str":"253174959"}],"hashtags":[],"urls":[{"display_url":"twitdat.com\/tools","expanded_url":"http:\/\/twitdat.com\/tools","url":"http:\/\/t.co\/Yl8DewV","indices":[32,51]}]},"id":110102449922121728,"id_str":"110102449922121728","place":null,"in_reply_to_status_id":null,"text":"Test de Reciprocidad en Twitter http:\/\/t.co\/Yl8DewV v\u00eda @twitdatcom","result_category":"recent"},{"id_str":"110102449896947712","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"","protected":false,"id_str":"172176570","notifications":false,"profile_background_tile":true,"screen_name":"bela_lopes2","name":"Isabela Lopes","listed_count":0,"location":"","show_all_inline_media":false,"contributors_enabled":false,"following":false,"geo_enabled":true,"utc_offset":-14400,"profile_link_color":"cb81de","description":"","profile_sidebar_border_color":"ffffff","url":"http:\/\/www.facebook.com\/IsaahLopes","time_zone":"Santiago","default_profile_image":false,"statuses_count":413,"profile_use_background_image":true,"verified":false,"favourites_count":4,"friends_count":195,"profile_background_color":"e05ee0","is_translator":false,"default_profile":false,"profile_background_image_url":"http:\/\/a2.twimg.com\/profile_background_images\/315191776\/190448_200664266619663_100000282739711_696335_665848_a.jpg","created_at":"Thu Jul 29 02:28:42 +0000 2010","followers_count":54,"follow_request_sent":false,"lang":"pt","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/315191776\/190448_200664266619663_100000282739711_696335_665848_a.jpg","id":172176570,"profile_text_color":"e673e6","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1513465899\/foto0675_001_normal.jpg","profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1513465899\/foto0675_001_normal.jpg"},"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 21:30:44 +0000 2011","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102449896947712,"place":null,"text":"Hi twitter acabei de chegar do plus e ja estou saindo daqui a pouco tem mag u.u","result_category":"recent"},{"id_str":"110102449607548928","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"","protected":false,"id_str":"199513730","notifications":false,"profile_background_tile":true,"screen_name":"News_MCyrus","name":"Noticias MileyCyrus.","listed_count":166,"location":"Toluka Lake \/ Nashville ","show_all_inline_media":false,"contributors_enabled":false,"following":true,"geo_enabled":false,"utc_offset":-10800,"profile_link_color":"bd3535","description":"Hechos, frases, fotos & todo lo que queres saber sobre Miley Ray Cyrus esta AQU\u00cd. Si te gustan los #News_MCyrus no dudes en seguirnos & dar RT. RADIANTE AMOR\u262e","profile_sidebar_border_color":"ffffff","url":"http:\/\/twitter.com\/#!\/News_MCyrus\/favorites","time_zone":"Buenos Aires","default_profile_image":false,"statuses_count":7114,"profile_use_background_image":true,"verified":false,"favourites_count":659,"friends_count":571,"profile_background_color":"613161","is_translator":false,"profile_background_image_url":"http:\/\/a2.twimg.com\/profile_background_images\/314729379\/violeta-chispas-wallpapers_7658_1920x1200.jpg","created_at":"Thu Oct 07 01:54:29 +0000 2010","followers_count":9020,"follow_request_sent":false,"lang":"es","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/314729379\/violeta-chispas-wallpapers_7658_1920x1200.jpg","id":199513730,"default_profile":false,"profile_text_color":"3C3940","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1518494905\/normal_009_normal.jpg","profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1518494905\/normal_009_normal.jpg"},"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 21:30:44 +0000 2011","entities":{"user_mentions":[{"name":"Rouse & Chizi.","screen_name":"NickJOrgasm","id_str":"220459277","indices":[24,36],"id":220459277}],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102449607548928,"place":null,"text":"SIGAN A MI OTRO TWITTER @NickJOrgasm .. DOY FOLLOW BACK A TODOOS LOS QUE ME SIGUEN =]","result_category":"recent"},{"id_str":"110102449100042240","in_reply_to_status_id":110101177487736832,"truncated":false,"user":{"profile_sidebar_fill_color":"daf50c","protected":false,"id_str":"104629704","notifications":false,"profile_background_tile":true,"screen_name":"bettaThanYa_EX","name":"NOONIE\u2122","listed_count":0,"location":"Location Not Found ...","show_all_inline_media":false,"contributors_enabled":false,"following":true,"geo_enabled":false,"utc_offset":-21600,"profile_link_color":"33adcc","description":"i be in my own lil world felling like . . Fuck you \u2192 you \u2191 you \u2197 you \u2193 oh, & you\u2198 ! - dnt lurk .. HOE jus Follow '","profile_sidebar_border_color":"0ebff0","url":null,"time_zone":"Central Time (US & Canada)","default_profile_image":false,"statuses_count":7060,"profile_use_background_image":true,"verified":false,"favourites_count":72,"friends_count":386,"profile_background_color":"10ad61","is_translator":false,"profile_background_image_url":"http:\/\/a2.twimg.com\/profile_background_images\/266467400\/rinekacurry.jpg","created_at":"Wed Jan 13 22:39:54 +0000 2010","followers_count":430,"default_profile":false,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/266467400\/rinekacurry.jpg","id":104629704,"profile_text_color":"f02bf0","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1515615525\/image_normal.jpg","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1515615525\/image_normal.jpg"},"favorited":false,"in_reply_to_status_id_str":"110101177487736832","geo":null,"in_reply_to_screen_name":"Tavia_Danielle","in_reply_to_user_id_str":"230065008","coordinates":null,"in_reply_to_user_id":230065008,"source":"web","created_at":"Sat Sep 03 21:30:44 +0000 2011","entities":{"user_mentions":[{"name":"Tavia Russell","screen_name":"Tavia_Danielle","id_str":"230065008","indices":[0,15],"id":230065008}],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102449100042240,"place":null,"text":"@Tavia_Danielle bitch dnt keep saying you not gne fuss on twitter but yet you still posting shit !!!","result_category":"recent"},{"id_str":"110102448923869184","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"f7f4f6","protected":false,"id_str":"95950724","notifications":false,"profile_background_tile":true,"screen_name":"bellahidalgo","name":"Isabella Hidalgo","listed_count":0,"location":"","show_all_inline_media":false,"contributors_enabled":false,"following":false,"geo_enabled":false,"utc_offset":-10800,"profile_link_color":"f51eb1","description":"","profile_sidebar_border_color":"ff00cc","url":null,"time_zone":"Greenland","default_profile_image":false,"statuses_count":1792,"profile_use_background_image":true,"default_profile":false,"verified":false,"favourites_count":14,"friends_count":78,"profile_background_color":"ff03cd","is_translator":false,"profile_background_image_url":"http:\/\/a3.twimg.com\/profile_background_images\/294789691\/tumblr_l13v25Ujet1qajhpuo1_500.jpg","created_at":"Thu Dec 10 17:59:33 +0000 2009","followers_count":77,"follow_request_sent":false,"lang":"pt","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/294789691\/tumblr_l13v25Ujet1qajhpuo1_500.jpg","id":95950724,"profile_text_color":"000000","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1441175861\/PQAAAJff1q2whMis3_AoguHrmzVkson0kPdvSivgdrcswwzS26fRlyazLhUV8Em9BxBcVrgtcj8Yv8PpgWKc2iDtIGMAm1T1UAh4nNdMyMN4p6PODOYqiZY4b2oE_normal.jpg","profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1441175861\/PQAAAJff1q2whMis3_AoguHrmzVkson0kPdvSivgdrcswwzS26fRlyazLhUV8Em9BxBcVrgtcj8Yv8PpgWKc2iDtIGMAm1T1UAh4nNdMyMN4p6PODOYqiZY4b2oE_normal.jpg"},"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 21:30:44 +0000 2011","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102448923869184,"place":null,"text":"aiai descobri que minha irm\u00e3 tava mexendo no meu twitter u-u","result_category":"recent"},{"id_str":"110102448873537537","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"ffffff","protected":false,"id_str":"240560217","notifications":null,"profile_background_tile":false,"screen_name":"CSImegan","name":"Megan Carter","default_profile":false,"listed_count":1,"location":"Carmel, IN","show_all_inline_media":false,"contributors_enabled":false,"following":null,"geo_enabled":false,"utc_offset":-18000,"profile_link_color":"93A644","description":"Pursuing my Masters in Forensic Biology. Purdue grad. Foodie. Avid reader. Christian. Sports fanatic. Random fact enthusiast. I love my hubby and 2 furry sons!","profile_sidebar_border_color":"eeeeee","url":null,"time_zone":"Indiana (East)","default_profile_image":false,"statuses_count":331,"profile_use_background_image":true,"verified":false,"favourites_count":0,"friends_count":363,"profile_background_color":"B2DFDA","is_translator":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/images\/themes\/theme13\/bg.gif","created_at":"Thu Jan 20 06:02:09 +0000 2011","followers_count":91,"follow_request_sent":null,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme13\/bg.gif","id":240560217,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1221377599\/SAM_1222_normal.JPG","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1221377599\/SAM_1222_normal.JPG"},"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:\/\/www.yelp.com\/\" rel=\"nofollow\"\u003EYelp\u003C\/a\u003E","created_at":"Sat Sep 03 21:30:44 +0000 2011","entities":{"user_mentions":[],"urls":[{"display_url":"bit.ly\/pMjZQy","expanded_url":"http:\/\/bit.ly\/pMjZQy","url":"http:\/\/t.co\/nvDM2ug","indices":[68,87]}],"hashtags":[{"indices":[62,67],"text":"Yelp"}]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102448873537537,"place":null,"text":"I checked in at Embassy Suites Hotel (4554 Lake Forest Dr) on #Yelp http:\/\/t.co\/nvDM2ug","result_category":"recent"},{"id_str":"110102448596729856","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"DDEEF6","protected":false,"id_str":"105869117","notifications":false,"profile_background_tile":false,"screen_name":"OmegaAudioVideo","name":"OmegaAudioVideo","listed_count":29,"location":"London, Ontario, Canada","show_all_inline_media":false,"contributors_enabled":false,"following":true,"geo_enabled":false,"utc_offset":-18000,"profile_link_color":"0084B4","description":"We are a premiere Custom AudioVisual company in London, ON. We match the technology you want, with your lifestyle and your budget! - Tweets by Matt Scott, Pres.","profile_sidebar_border_color":"C0DEED","url":"http:\/\/www.OmegaAudio.net","time_zone":"Eastern Time (US & Canada)","default_profile_image":false,"statuses_count":4273,"profile_use_background_image":true,"verified":false,"favourites_count":2,"friends_count":415,"profile_background_color":"C0DEED","is_translator":false,"profile_background_image_url":"http:\/\/a2.twimg.com\/profile_background_images\/289421859\/OAVtwitBG.jpg","created_at":"Sun Jan 17 19:30:24 +0000 2010","followers_count":389,"default_profile":false,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/289421859\/OAVtwitBG.jpg","id":105869117,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1338877809\/Logo_normal.jpg","profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1338877809\/Logo_normal.jpg"},"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:\/\/www.tweetdeck.com\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E","created_at":"Sat Sep 03 21:30:44 +0000 2011","entities":{"user_mentions":[{"name":"Jim Kelly","screen_name":"GeekInAwe","id_str":"322429893","indices":[68,78],"id":322429893}],"urls":[{"display_url":"deck.ly\/~2WX4z","expanded_url":"http:\/\/deck.ly\/~2WX4z","url":"http:\/\/t.co\/s1SbNXE","indices":[115,134]}],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102448596729856,"place":null,"text":"You stink, I'm kidding! Have fun man! You coming back for Cedia? RT @GeekInAwe: Yup! You read it correctly\u2026 (cont) http:\/\/t.co\/s1SbNXE","result_category":"recent"},{"id_str":"110102448332472320","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"F6F6F6","protected":false,"id_str":"51282724","notifications":null,"profile_background_tile":false,"screen_name":"b_ferrera","name":"Bruno Reis","default_profile":false,"listed_count":0,"location":"Brazil..on my way to Canada","show_all_inline_media":false,"contributors_enabled":false,"following":null,"geo_enabled":true,"utc_offset":-10800,"profile_link_color":"038543","description":"Hi there! College in 2011, Brazil hopefully not for too long but soon in Canada","profile_sidebar_border_color":"EEEEEE","url":null,"time_zone":"Brasilia","default_profile_image":false,"statuses_count":1021,"profile_use_background_image":true,"verified":false,"favourites_count":5,"friends_count":117,"profile_background_color":"ACDED6","is_translator":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/images\/themes\/theme18\/bg.gif","created_at":"Sat Jun 27 00:04:33 +0000 2009","followers_count":54,"follow_request_sent":null,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme18\/bg.gif","id":51282724,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1300101851\/DSC01425_normal.jpg","profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1300101851\/DSC01425_normal.jpg"},"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:30:43 +0000 2011","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102448332472320,"place":null,"text":"Alguem conhece um twitter que zoa corinthians?? Pq tem algumas pessoas q ficam retweeting uns tweets que me irritam demaais!!","result_category":"recent"},{"id_str":"110102448286339072","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"f0f073","protected":false,"id_str":"185890956","notifications":false,"profile_background_tile":false,"screen_name":"PlayaMiaBeach","name":"Playa Mia Cozumel","listed_count":1,"location":"Cozumel, M\u00e9xico","show_all_inline_media":false,"contributors_enabled":false,"following":true,"geo_enabled":false,"utc_offset":null,"profile_link_color":"b35c00","description":"Live a memorable experience at the Mexican Caribbean in one of the finest beach clubs in Cozumel. ","profile_sidebar_border_color":"ebcf2f","url":"http:\/\/www.playamiacozumel.com\/","time_zone":null,"default_profile_image":false,"statuses_count":508,"profile_use_background_image":true,"default_profile":false,"verified":false,"favourites_count":0,"friends_count":410,"profile_background_color":"f7f794","is_translator":false,"profile_background_image_url":"http:\/\/a2.twimg.com\/profile_background_images\/266405327\/back_twitter.jpg","created_at":"Thu Sep 02 02:20:29 +0000 2010","followers_count":247,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/266405327\/back_twitter.jpg","id":185890956,"profile_text_color":"eb7e2a","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1118774346\/Playa_Mia__3__normal.jpg","profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1118774346\/Playa_Mia__3__normal.jpg"},"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":"Sat Sep 03 21:30:44 +0000 2011","entities":{"user_mentions":[{"name":"Playa Mia Cozumel","screen_name":"PlayaMiaBeach","id_str":"185890956","indices":[13,27],"id":185890956}],"urls":[],"media":[{"type":"photo","id_str":"110102448290533376","display_url":"pic.twitter.com\/bH36L0s","expanded_url":"http:\/\/twitter.com\/PlayaMiaBeach\/status\/110102448286339072\/photo\/1","media_url_https":"https:\/\/p.twimg.com\/AYcpl-dCEAAOc3o.jpg","url":"http:\/\/t.co\/bH36L0s","indices":[109,128],"sizes":{"small":{"h":340,"w":340,"resize":"fit"},"large":{"h":480,"w":480,"resize":"fit"},"thumb":{"h":150,"w":150,"resize":"crop"},"medium":{"h":480,"w":480,"resize":"fit"}},"id":110102448290533376,"media_url":"http:\/\/p.twimg.com\/AYcpl-dCEAAOc3o.jpg"}],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102448286339072,"place":null,"text":"In behalf of @PlayaMiaBeach we wanted to thank everyone for following us. We wish you a wonderful weekend!!! http:\/\/t.co\/bH36L0s","result_category":"recent"},{"id_str":"110102448273760256","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"DDEEF6","protected":false,"id_str":"365993812","notifications":false,"profile_background_tile":false,"screen_name":"Bieltmadalena","name":"Gabriel Ton Madalena","listed_count":0,"location":null,"show_all_inline_media":false,"contributors_enabled":false,"following":false,"geo_enabled":false,"utc_offset":null,"profile_link_color":"0084B4","description":null,"default_profile":true,"profile_sidebar_border_color":"C0DEED","url":null,"time_zone":null,"default_profile_image":true,"statuses_count":14,"profile_use_background_image":true,"verified":false,"favourites_count":0,"friends_count":36,"profile_background_color":"C0DEED","is_translator":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","created_at":"Thu Sep 01 11:33:14 +0000 2011","followers_count":4,"follow_request_sent":false,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","id":365993812,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/sticky\/default_profile_images\/default_profile_2_normal.png","profile_image_url":"http:\/\/a1.twimg.com\/sticky\/default_profile_images\/default_profile_2_normal.png"},"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 21:30:43 +0000 2011","entities":{"user_mentions":[],"urls":[],"hashtags":[]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102448273760256,"place":null,"text":"meu cunhado acha twitter coisa de besta","result_category":"recent"},{"id_str":"110102447757869056","in_reply_to_status_id":null,"truncated":false,"user":{"profile_sidebar_fill_color":"DDEEF6","protected":false,"id_str":"41335311","notifications":null,"profile_background_tile":false,"screen_name":"rico82","name":"Rico Coutain","default_profile":true,"listed_count":2,"location":"London, England","show_all_inline_media":false,"contributors_enabled":false,"following":null,"geo_enabled":false,"utc_offset":0,"profile_link_color":"0084B4","description":"","profile_sidebar_border_color":"C0DEED","url":null,"time_zone":"London","default_profile_image":false,"statuses_count":1019,"profile_use_background_image":true,"verified":false,"favourites_count":5,"friends_count":67,"profile_background_color":"C0DEED","is_translator":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","created_at":"Wed May 20 10:50:39 +0000 2009","followers_count":69,"follow_request_sent":null,"lang":"en","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","id":41335311,"profile_text_color":"333333","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1385690568\/_JM__20_20Rico_20_20_GD__normal.jpg","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1385690568\/_JM__20_20Rico_20_20_GD__normal.jpg"},"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:\/\/blackberry.com\/twitter\" rel=\"nofollow\"\u003ETwitter for BlackBerry\u00ae\u003C\/a\u003E","created_at":"Sat Sep 03 21:30:43 +0000 2011","entities":{"user_mentions":[{"name":"Delphina James","screen_name":"Panness","id_str":"130576543","indices":[1,9],"id":130576543}],"urls":[],"hashtags":[{"indices":[92,102],"text":"Sharezies"}]},"contributors":null,"retweeted":false,"retweet_count":0,"id":110102447757869056,"place":null,"text":"\"@Panness: TWITTER-CREW! I JUST FOUND \u00a35 IN MY WINTER-COAT....Now #ThatsWhatImTalkingAbout\" #Sharezies!","result_category":"recent"}],"served_by_blender":false,"error":null,"next_page":null} \ No newline at end of file diff --git a/spec/twitter/client/search_spec.rb b/spec/twitter/client/search_spec.rb index eb7b1a725..5ff0ab7e9 100644 --- a/spec/twitter/client/search_spec.rb +++ b/spec/twitter/client/search_spec.rb @@ -7,7 +7,7 @@ @client = Twitter::Client.new(:format => format) end - describe ".image_facets" do + describe ".images" do before do stub_get("i/search/image_facets.#{format}"). @@ -16,20 +16,20 @@ end it "should get the correct resource" do - @client.image_facets('twitter') + @client.images('twitter') a_get("i/search/image_facets.#{format}"). with(:query => {:q => "twitter"}). should have_been_made end - it "should return a single status" do - image_facets = @client.image_facets('twitter') - image_facets.first.text.should == "Thanks Twitter family! Beautiful. Cc @laurelstout @seacue @janetvh @mgale @choppedonion http://t.co/drAqoba" + it "should return recent statuses that contain images related to a query" do + images = @client.images('twitter') + images.first.text.should == "Thanks Twitter family! Beautiful. Cc @laurelstout @seacue @janetvh @mgale @choppedonion http://t.co/drAqoba" end end - describe ".video_facets" do + describe ".videos" do before do stub_get("i/search/video_facets.#{format}"). @@ -38,15 +38,36 @@ end it "should get the correct resource" do - @client.video_facets('twitter') + @client.videos('twitter') a_get("i/search/video_facets.#{format}"). with(:query => {:q => "twitter"}). should have_been_made end - it "should return a single status" do - video_facets = @client.video_facets('twitter') - video_facets.first.text.should == "@Foofighters LEGENDS with a Legendary set of Music Videos http://t.co/IcVGIQO #VMA #VEVO" + it "should return recent statuses that contain videos related to a query" do + videos = @client.videos('twitter') + videos.first.text.should == "@Foofighters LEGENDS with a Legendary set of Music Videos http://t.co/IcVGIQO #VMA #VEVO" + end + end + + describe ".search" do + + before do + stub_get("phoenix_search.phoenix"). + with(:query => {:q => "twitter"}). + to_return(:body => fixture("phoenix_search.phoenix"), :headers => {:content_type => "application/#{format}; charset=utf-8"}) + end + + it "should get the correct resource" do + @client.search('twitter') + a_get("phoenix_search.phoenix"). + with(:query => {:q => "twitter"}). + should have_been_made + end + + it "should return recent statuses related to a query with images and videos embedded" do + search = @client.search('twitter') + search.first.text.should == "looking at twitter trends just makes me realize how little i really understand about mankind." end end end