twitter 5.0.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.yardopts +4 -0
- data/CHANGELOG.md +47 -0
- data/CONTRIBUTING.md +5 -5
- data/README.md +57 -56
- data/Rakefile +26 -5
- data/lib/twitter/arguments.rb +1 -2
- data/lib/twitter/base.rb +15 -18
- data/lib/twitter/basic_user.rb +3 -3
- data/lib/twitter/client.rb +9 -10
- data/lib/twitter/configuration.rb +5 -5
- data/lib/twitter/creatable.rb +0 -1
- data/lib/twitter/cursor.rb +9 -36
- data/lib/twitter/direct_message.rb +1 -1
- data/lib/twitter/entity/uri.rb +2 -2
- data/lib/twitter/enumerable.rb +10 -1
- data/lib/twitter/error/already_favorited.rb +1 -1
- data/lib/twitter/error/already_posted.rb +1 -1
- data/lib/twitter/error/already_retweeted.rb +1 -1
- data/lib/twitter/error/too_many_requests.rb +2 -2
- data/lib/twitter/error.rb +6 -6
- data/lib/twitter/factory.rb +2 -6
- data/lib/twitter/geo/point.rb +3 -5
- data/lib/twitter/geo.rb +1 -1
- data/lib/twitter/geo_factory.rb +1 -5
- data/lib/twitter/geo_results.rb +5 -8
- data/lib/twitter/identity.rb +1 -2
- data/lib/twitter/list.rb +10 -11
- data/lib/twitter/media/photo.rb +1 -2
- data/lib/twitter/media_factory.rb +1 -5
- data/lib/twitter/null_object.rb +4 -6
- data/lib/twitter/oembed.rb +1 -1
- data/lib/twitter/place.rb +17 -6
- data/lib/twitter/profile_banner.rb +1 -3
- data/lib/twitter/rate_limit.rb +1 -3
- data/lib/twitter/relationship.rb +1 -2
- data/lib/twitter/rest/api/direct_messages.rb +15 -15
- data/lib/twitter/rest/api/favorites.rb +15 -15
- data/lib/twitter/rest/api/friends_and_followers.rb +37 -42
- data/lib/twitter/rest/api/help.rb +8 -9
- data/lib/twitter/rest/api/lists.rb +69 -69
- data/lib/twitter/rest/api/oauth.rb +3 -4
- data/lib/twitter/rest/api/places_and_geo.rb +9 -10
- data/lib/twitter/rest/api/saved_searches.rb +8 -8
- data/lib/twitter/rest/api/search.rb +10 -2
- data/lib/twitter/rest/api/spam_reporting.rb +1 -2
- data/lib/twitter/rest/api/suggested_users.rb +4 -5
- data/lib/twitter/rest/api/timelines.rb +17 -18
- data/lib/twitter/rest/api/trends.rb +10 -11
- data/lib/twitter/rest/api/tweets.rb +31 -20
- data/lib/twitter/rest/api/undocumented.rb +6 -7
- data/lib/twitter/rest/api/users.rb +53 -54
- data/lib/twitter/rest/api/utils.rb +28 -34
- data/lib/twitter/rest/client.rb +8 -9
- data/lib/twitter/rest/request/multipart_with_file.rb +7 -5
- data/lib/twitter/rest/response/parse_error_json.rb +0 -2
- data/lib/twitter/rest/response/parse_json.rb +2 -2
- data/lib/twitter/rest/response/raise_error.rb +1 -3
- data/lib/twitter/search_results.rb +38 -56
- data/lib/twitter/settings.rb +2 -2
- data/lib/twitter/size.rb +2 -2
- data/lib/twitter/source_user.rb +1 -1
- data/lib/twitter/streaming/client.rb +69 -18
- data/lib/twitter/streaming/connection.rb +1 -3
- data/lib/twitter/streaming/deleted_tweet.rb +8 -0
- data/lib/twitter/streaming/event.rb +8 -8
- data/lib/twitter/streaming/friend_list.rb +2 -9
- data/lib/twitter/streaming/message_parser.rb +13 -3
- data/lib/twitter/streaming/response.rb +0 -2
- data/lib/twitter/streaming/stall_warning.rb +7 -0
- data/lib/twitter/suggestion.rb +0 -1
- data/lib/twitter/token.rb +2 -3
- data/lib/twitter/trend_results.rb +5 -8
- data/lib/twitter/tweet.rb +17 -18
- data/lib/twitter/user.rb +33 -35
- data/lib/twitter/utils.rb +14 -0
- data/lib/twitter/version.rb +2 -5
- data/lib/twitter.rb +1 -1
- data/spec/fixtures/forbidden.json +1 -0
- data/spec/fixtures/search.json +1 -1
- data/spec/fixtures/search2.json +1 -0
- data/spec/fixtures/track_streaming_user.json +2 -1
- data/spec/helper.rb +6 -2
- data/spec/twitter/base_spec.rb +9 -9
- data/spec/twitter/basic_user_spec.rb +6 -6
- data/spec/twitter/configuration_spec.rb +4 -4
- data/spec/twitter/cursor_spec.rb +13 -51
- data/spec/twitter/direct_message_spec.rb +36 -36
- data/spec/twitter/entity/uri_spec.rb +29 -29
- data/spec/twitter/error_spec.rb +21 -21
- data/spec/twitter/geo/point_spec.rb +9 -9
- data/spec/twitter/geo/polygon_spec.rb +5 -5
- data/spec/twitter/geo_factory_spec.rb +7 -7
- data/spec/twitter/geo_results_spec.rb +11 -11
- data/spec/twitter/geo_spec.rb +5 -5
- data/spec/twitter/identifiable_spec.rb +9 -9
- data/spec/twitter/list_spec.rb +38 -38
- data/spec/twitter/media/photo_spec.rb +58 -58
- data/spec/twitter/media_factory_spec.rb +5 -5
- data/spec/twitter/null_object_spec.rb +6 -6
- data/spec/twitter/oembed_spec.rb +68 -68
- data/spec/twitter/place_spec.rb +91 -62
- data/spec/twitter/profile_banner_spec.rb +3 -3
- data/spec/twitter/rate_limit_spec.rb +18 -18
- data/spec/twitter/relationship_spec.rb +16 -16
- data/spec/twitter/rest/api/direct_messages_spec.rb +61 -61
- data/spec/twitter/rest/api/favorites_spec.rb +93 -93
- data/spec/twitter/rest/api/friends_and_followers_spec.rb +357 -349
- data/spec/twitter/rest/api/geo_spec.rb +33 -33
- data/spec/twitter/rest/api/help_spec.rb +24 -24
- data/spec/twitter/rest/api/lists_spec.rb +487 -487
- data/spec/twitter/rest/api/oauth_spec.rb +30 -30
- data/spec/twitter/rest/api/saved_searches_spec.rb +50 -40
- data/spec/twitter/rest/api/search_spec.rb +27 -26
- data/spec/twitter/rest/api/spam_reporting_spec.rb +9 -9
- data/spec/twitter/rest/api/suggested_users_spec.rb +23 -23
- data/spec/twitter/rest/api/timelines_spec.rb +58 -58
- data/spec/twitter/rest/api/trends_spec.rb +26 -26
- data/spec/twitter/rest/api/tweets_spec.rb +304 -266
- data/spec/twitter/rest/api/undocumented_spec.rb +51 -51
- data/spec/twitter/rest/api/users_spec.rb +360 -360
- data/spec/twitter/rest/client_spec.rb +99 -103
- data/spec/twitter/saved_search_spec.rb +16 -16
- data/spec/twitter/search_results_spec.rb +14 -110
- data/spec/twitter/settings_spec.rb +8 -8
- data/spec/twitter/size_spec.rb +5 -5
- data/spec/twitter/source_user_spec.rb +6 -6
- data/spec/twitter/streaming/client_spec.rb +85 -54
- data/spec/twitter/streaming/deleted_tweet_spec.rb +23 -0
- data/spec/twitter/streaming/event_spec.rb +20 -22
- data/spec/twitter/streaming/friend_list_spec.rb +11 -0
- data/spec/twitter/streaming/message_parser_spec.rb +54 -0
- data/spec/twitter/suggestion_spec.rb +11 -11
- data/spec/twitter/target_user_spec.rb +6 -6
- data/spec/twitter/token_spec.rb +4 -4
- data/spec/twitter/trend_results_spec.rb +30 -30
- data/spec/twitter/trend_spec.rb +21 -21
- data/spec/twitter/tweet_spec.rb +178 -164
- data/spec/twitter/user_spec.rb +190 -190
- data/twitter.gemspec +6 -6
- data.tar.gz.sig +0 -0
- metadata +44 -16
- metadata.gz.sig +0 -0
- data/lib/twitter/core_ext/enumerable.rb +0 -10
- data/lib/twitter/core_ext/kernel.rb +0 -10
- data/spec/twitter_spec.rb +0 -0
data/lib/twitter/user.rb
CHANGED
|
@@ -7,32 +7,32 @@ module Twitter
|
|
|
7
7
|
PREDICATE_URI_METHOD_REGEX = /_uri\?$/
|
|
8
8
|
include Twitter::Creatable
|
|
9
9
|
attr_reader :connections, :contributors_enabled, :default_profile,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
:default_profile_image, :description, :favourites_count,
|
|
11
|
+
:follow_request_sent, :followers_count, :friends_count,
|
|
12
|
+
:geo_enabled, :is_translator, :lang, :listed_count, :location,
|
|
13
|
+
:name, :notifications, :profile_background_color,
|
|
14
|
+
:profile_background_image_url,
|
|
15
|
+
:profile_background_image_url_https, :profile_background_tile,
|
|
16
|
+
:profile_link_color, :profile_sidebar_border_color,
|
|
17
|
+
:profile_sidebar_fill_color, :profile_text_color,
|
|
18
|
+
:profile_use_background_image, :protected, :statuses_count,
|
|
19
|
+
:time_zone, :utc_offset, :verified
|
|
20
|
+
alias_method :favorites_count, :favourites_count
|
|
20
21
|
remove_method :favourites_count
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
alias_method :profile_background_image_uri, :profile_background_image_url
|
|
23
|
+
alias_method :profile_background_image_uri_https, :profile_background_image_url_https
|
|
24
|
+
alias_method :translator?, :is_translator
|
|
25
|
+
alias_method :tweets_count, :statuses_count
|
|
25
26
|
object_attr_reader :Tweet, :status, :user
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
alias_method :tweet, :status
|
|
28
|
+
alias_method :tweet?, :status?
|
|
29
|
+
alias_method :tweeted?, :status?
|
|
29
30
|
|
|
30
31
|
class << self
|
|
31
|
-
|
|
32
32
|
private
|
|
33
33
|
|
|
34
34
|
def alias_predicate_uri_methods(method)
|
|
35
|
-
|
|
35
|
+
%w(_url? _uri_https? _url_https?).each do |replacement|
|
|
36
36
|
alias_method_sub(method, PREDICATE_URI_METHOD_REGEX, replacement)
|
|
37
37
|
end
|
|
38
38
|
end
|
|
@@ -40,7 +40,6 @@ module Twitter
|
|
|
40
40
|
def alias_method_sub(method, pattern, replacement)
|
|
41
41
|
alias_method(method.to_s.sub(pattern, replacement).to_sym, method)
|
|
42
42
|
end
|
|
43
|
-
|
|
44
43
|
end
|
|
45
44
|
|
|
46
45
|
# @return [Array<Twitter::Entity::URI>]
|
|
@@ -50,25 +49,25 @@ module Twitter
|
|
|
50
49
|
end
|
|
51
50
|
end
|
|
52
51
|
memoize :description_uris
|
|
53
|
-
|
|
52
|
+
alias_method :description_urls, :description_uris
|
|
54
53
|
|
|
55
54
|
# Return the URL to the user's profile banner image
|
|
56
55
|
#
|
|
57
56
|
# @param size [String, Symbol] The size of the image. Must be one of: 'mobile', 'mobile_retina', 'web', 'web_retina', 'ipad', or 'ipad_retina'
|
|
58
57
|
# @return [String]
|
|
59
|
-
def profile_banner_uri(size
|
|
58
|
+
def profile_banner_uri(size = :web)
|
|
60
59
|
parse_encoded_uri(insecure_uri([@attrs[:profile_banner_url], size].join('/'))) if @attrs[:profile_banner_url]
|
|
61
60
|
end
|
|
62
|
-
|
|
61
|
+
alias_method :profile_banner_url, :profile_banner_uri
|
|
63
62
|
|
|
64
63
|
# Return the secure URL to the user's profile banner image
|
|
65
64
|
#
|
|
66
65
|
# @param size [String, Symbol] The size of the image. Must be one of: 'mobile', 'mobile_retina', 'web', 'web_retina', 'ipad', or 'ipad_retina'
|
|
67
66
|
# @return [String]
|
|
68
|
-
def profile_banner_uri_https(size
|
|
67
|
+
def profile_banner_uri_https(size = :web)
|
|
69
68
|
parse_encoded_uri([@attrs[:profile_banner_url], size].join('/')) if @attrs[:profile_banner_url]
|
|
70
69
|
end
|
|
71
|
-
|
|
70
|
+
alias_method :profile_banner_url_https, :profile_banner_uri_https
|
|
72
71
|
|
|
73
72
|
# @return [Boolean]
|
|
74
73
|
def profile_banner_uri?
|
|
@@ -81,16 +80,16 @@ module Twitter
|
|
|
81
80
|
#
|
|
82
81
|
# @param size [String, Symbol] The size of the image. Must be one of: 'mini', 'normal', 'bigger' or 'original'
|
|
83
82
|
# @return [String]
|
|
84
|
-
def profile_image_uri(size
|
|
83
|
+
def profile_image_uri(size = :normal)
|
|
85
84
|
parse_encoded_uri(insecure_uri(profile_image_uri_https(size))) if @attrs[:profile_image_url_https]
|
|
86
85
|
end
|
|
87
|
-
|
|
86
|
+
alias_method :profile_image_url, :profile_image_uri
|
|
88
87
|
|
|
89
88
|
# Return the secure URL to the user's profile image
|
|
90
89
|
#
|
|
91
90
|
# @param size [String, Symbol] The size of the image. Must be one of: 'mini', 'normal', 'bigger' or 'original'
|
|
92
91
|
# @return [String]
|
|
93
|
-
def profile_image_uri_https(size
|
|
92
|
+
def profile_image_uri_https(size = :normal)
|
|
94
93
|
# The profile image URL comes in looking like like this:
|
|
95
94
|
# https://a0.twimg.com/profile_images/1759857427/image1326743606_normal.png
|
|
96
95
|
# It can be converted to any of the following sizes:
|
|
@@ -99,7 +98,7 @@ module Twitter
|
|
|
99
98
|
# https://a0.twimg.com/profile_images/1759857427/image1326743606_bigger.png
|
|
100
99
|
parse_encoded_uri(@attrs[:profile_image_url_https].sub(PROFILE_IMAGE_SUFFIX_REGEX, profile_image_suffix(size))) if @attrs[:profile_image_url_https]
|
|
101
100
|
end
|
|
102
|
-
|
|
101
|
+
alias_method :profile_image_url_https, :profile_image_uri_https
|
|
103
102
|
|
|
104
103
|
def profile_image_uri?
|
|
105
104
|
!!@attrs[:profile_image_url_https]
|
|
@@ -109,14 +108,14 @@ module Twitter
|
|
|
109
108
|
|
|
110
109
|
# @return [String] The URL to the user.
|
|
111
110
|
def uri
|
|
112
|
-
URI.parse("https://twitter.com/#{screen_name}")
|
|
111
|
+
Addressable::URI.parse("https://twitter.com/#{screen_name}")
|
|
113
112
|
end
|
|
114
113
|
memoize :uri
|
|
115
|
-
|
|
114
|
+
alias_method :url, :uri
|
|
116
115
|
|
|
117
116
|
# @return [String] The URL to the user's website.
|
|
118
117
|
def website
|
|
119
|
-
URI.parse(@attrs[:url]) if @attrs[:url]
|
|
118
|
+
Addressable::URI.parse(@attrs[:url]) if @attrs[:url]
|
|
120
119
|
end
|
|
121
120
|
memoize :website
|
|
122
121
|
|
|
@@ -128,7 +127,7 @@ module Twitter
|
|
|
128
127
|
private
|
|
129
128
|
|
|
130
129
|
def parse_encoded_uri(uri)
|
|
131
|
-
URI.parse(URI.encode(uri))
|
|
130
|
+
Addressable::URI.parse(URI.encode(uri))
|
|
132
131
|
end
|
|
133
132
|
|
|
134
133
|
def insecure_uri(uri)
|
|
@@ -136,8 +135,7 @@ module Twitter
|
|
|
136
135
|
end
|
|
137
136
|
|
|
138
137
|
def profile_image_suffix(size)
|
|
139
|
-
:original == size.to_sym ?
|
|
138
|
+
:original == size.to_sym ? '\\1' : "_#{size}\\1"
|
|
140
139
|
end
|
|
141
|
-
|
|
142
140
|
end
|
|
143
141
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module Twitter
|
|
2
|
+
module Utils
|
|
3
|
+
class << self
|
|
4
|
+
def parallel_map(enumerable)
|
|
5
|
+
# Don't bother spawning a new thread if there's only one item
|
|
6
|
+
if enumerable.count == 1
|
|
7
|
+
enumerable.map { |object| yield object }
|
|
8
|
+
else
|
|
9
|
+
enumerable.map { |object| Thread.new { yield object } }.map(&:value)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
data/lib/twitter/version.rb
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
module Twitter
|
|
2
2
|
class Version
|
|
3
3
|
MAJOR = 5
|
|
4
|
-
MINOR =
|
|
5
|
-
PATCH =
|
|
4
|
+
MINOR = 4
|
|
5
|
+
PATCH = 1
|
|
6
6
|
PRE = nil
|
|
7
7
|
|
|
8
8
|
class << self
|
|
9
|
-
|
|
10
9
|
# @return [String]
|
|
11
10
|
def to_s
|
|
12
11
|
[MAJOR, MINOR, PATCH, PRE].compact.join('.')
|
|
13
12
|
end
|
|
14
|
-
|
|
15
13
|
end
|
|
16
|
-
|
|
17
14
|
end
|
|
18
15
|
end
|
data/lib/twitter.rb
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require 'addressable/uri'
|
|
1
2
|
require 'twitter/configuration'
|
|
2
3
|
require 'twitter/cursor'
|
|
3
4
|
require 'twitter/direct_message'
|
|
@@ -28,4 +29,3 @@ require 'twitter/target_user'
|
|
|
28
29
|
require 'twitter/trend'
|
|
29
30
|
require 'twitter/tweet'
|
|
30
31
|
require 'twitter/user'
|
|
31
|
-
require 'uri'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"errors":[{"code":160,"message":"You've already requested to follow %s."}]}
|
data/spec/fixtures/search.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"statuses":[{"metadata":{"result_type":"recent","iso_language_code":"en"},"created_at":"Mon Sep 17 22:41:52 +0000 2012","id":247827742178021376,"id_str":"247827742178021376","text":"Bubble Mailer #freebandnames","source":"\u003ca href=\"http:\/\/tapbots.com\" rel=\"nofollow\"\u003eTweetbot for Mac\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":671293,"id_str":"671293","name":"Richard Allen","screen_name":"richrad","location":"Kansas City","url":"http:\/\/richardallen.me","description":"Give me a break, Jeffery.","protected":false,"followers_count":174,"friends_count":273,"listed_count":2,"created_at":"Sat Jan 20 16:02:45 +0000 2007","favourites_count":383,"utc_offset":-21600,"time_zone":"Central Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":1370,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"0099B9","profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme4\/bg.gif","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme4\/bg.gif","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1399177739\/notlookingup_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1399177739\/notlookingup_normal.jpeg","profile_link_color":"0099B9","profile_sidebar_border_color":"5ED4DC","profile_sidebar_fill_color":"95E8EC","profile_text_color":"3C3940","profile_use_background_image":true,"show_all_inline_media":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"entities":{"hashtags":[{"text":"freebandnames","indices":[14,28]}],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false}],"search_metadata":{"completed_in":0.029,"max_id":250126199840518145,"max_id_str":"250126199840518145","next_page":"?page=2&max_id=250126199840518145&q=%23freebandnames&rpp=4&include_entities=1&result_type=mixed","page":1,"query":"%23freebandnames","refresh_url":"?since_id=250126199840518145&q=%23freebandnames&result_type=mixed&include_entities=1","count":4,"since_id":24012619984051000,"since_id_str":"24012619984051000"}}
|
|
1
|
+
{"statuses":[{"metadata":{"result_type":"recent","iso_language_code":"en"},"created_at":"Fri Dec 20 16:52:25 +0000 2013","id":414075829182676992,"id_str":"414075829182676992","text":"@Just_Reboot #FreeBandNames mono surround","source":"\u003ca href=\"http:\/\/www.myplume.com\/\" rel=\"nofollow\"\u003ePlume\u00a0for\u00a0Android\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":414069174856843264,"in_reply_to_status_id_str":"414069174856843264","in_reply_to_user_id":29296581,"in_reply_to_user_id_str":"29296581","in_reply_to_screen_name":"Just_Reboot","user":{"id":546527520,"id_str":"546527520","name":"Phil Empanada","screen_name":"ItsFuckinOhSo","location":"By cacti and sand","description":"Insert cheesy warnings about this account","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":257,"friends_count":347,"listed_count":10,"created_at":"Fri Apr 06 02:15:16 +0000 2012","favourites_count":345,"utc_offset":-25200,"time_zone":"Arizona","geo_enabled":false,"verified":false,"statuses_count":21765,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/414512901680930816\/AcmN-ByT_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/414512901680930816\/AcmN-ByT_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/546527520\/1371244104","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"FreeBandNames","indices":[13,27]}],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"Just_Reboot","name":"Reboot","id":29296581,"id_str":"29296581","indices":[0,12]}]},"favorited":false,"retweeted":false,"lang":"en"},{"metadata":{"result_type":"recent","iso_language_code":"en"},"created_at":"Fri Dec 20 16:43:32 +0000 2013","id":414073595372265472,"id_str":"414073595372265472","text":"RT @Just_Reboot: The Dick Tonsils #FreeBandNames\u00a0","source":"\u003ca href=\"http:\/\/twitter.com\/download\/android\" rel=\"nofollow\"\u003eTwitter for Android\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":109670150,"id_str":"109670150","name":"Derek Rodriguez","screen_name":"drod2169","location":"Tampa, Florida","description":"Web Developer, College Student, Workout Addict, Taco Fiend. #FBGT","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":3119,"friends_count":714,"listed_count":142,"created_at":"Fri Jan 29 21:29:16 +0000 2010","favourites_count":3728,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":46991,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/3347464379\/1046c92ab1834f1a3c1692ea585a1d69_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/3347464379\/1046c92ab1834f1a3c1692ea585a1d69_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/109670150\/1368729387","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"metadata":{"result_type":"recent","iso_language_code":"en"},"created_at":"Fri Dec 20 16:34:40 +0000 2013","id":414071361066532864,"id_str":"414071361066532864","text":"The Dick Tonsils #FreeBandNames\u00a0","source":"\u003ca href=\"http:\/\/www.myplume.com\/\" rel=\"nofollow\"\u003ePlume\u00a0for\u00a0Android\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":29296581,"id_str":"29296581","name":"Reboot","screen_name":"Just_Reboot","location":"NC","description":"G+ http:\/\/t.co\/MyXmhCAtnD\r\n#TeamKang PR, Attempted Writer, IT Tech, Social Media Berserker and Entertainer, Adjectives, Assertions, Disclaimers","url":null,"entities":{"description":{"urls":[{"url":"http:\/\/t.co\/MyXmhCAtnD","expanded_url":"http:\/\/goo.gl\/giVTc","display_url":"goo.gl\/giVTc","indices":[3,25]}]}},"protected":false,"followers_count":2244,"friends_count":435,"listed_count":60,"created_at":"Mon Apr 06 21:21:27 +0000 2009","favourites_count":79,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":27703,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"131516","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/871578268\/5db26751bf732750f5ca1ed4f9f59309.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/871578268\/5db26751bf732750f5ca1ed4f9f59309.png","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/378800000480531175\/93e8b5cb95a635ebb81302f5b6044a76_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/378800000480531175\/93e8b5cb95a635ebb81302f5b6044a76_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/29296581\/1368898490","profile_link_color":"009999","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"EFEFEF","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1,"favorite_count":1,"entities":{"hashtags":[{"text":"FreeBandNames","indices":[17,31]}],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"},"retweet_count":1,"favorite_count":0,"entities":{"hashtags":[{"text":"FreeBandNames","indices":[34,48]}],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"Just_Reboot","name":"Reboot","id":29296581,"id_str":"29296581","indices":[3,15]}]},"favorited":false,"retweeted":false,"lang":"en"},{"metadata":{"result_type":"recent","iso_language_code":"en"},"created_at":"Fri Dec 20 16:34:40 +0000 2013","id":414071361066532864,"id_str":"414071361066532864","text":"The Dick Tonsils #FreeBandNames\u00a0","source":"\u003ca href=\"http:\/\/www.myplume.com\/\" rel=\"nofollow\"\u003ePlume\u00a0for\u00a0Android\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":29296581,"id_str":"29296581","name":"Reboot","screen_name":"Just_Reboot","location":"NC","description":"G+ http:\/\/t.co\/MyXmhCAtnD\r\n#TeamKang PR, Attempted Writer, IT Tech, Social Media Berserker and Entertainer, Adjectives, Assertions, Disclaimers","url":null,"entities":{"description":{"urls":[{"url":"http:\/\/t.co\/MyXmhCAtnD","expanded_url":"http:\/\/goo.gl\/giVTc","display_url":"goo.gl\/giVTc","indices":[3,25]}]}},"protected":false,"followers_count":2244,"friends_count":435,"listed_count":60,"created_at":"Mon Apr 06 21:21:27 +0000 2009","favourites_count":79,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":27703,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"131516","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/871578268\/5db26751bf732750f5ca1ed4f9f59309.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/871578268\/5db26751bf732750f5ca1ed4f9f59309.png","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/378800000480531175\/93e8b5cb95a635ebb81302f5b6044a76_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/378800000480531175\/93e8b5cb95a635ebb81302f5b6044a76_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/29296581\/1368898490","profile_link_color":"009999","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"EFEFEF","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1,"favorite_count":1,"entities":{"hashtags":[{"text":"FreeBandNames","indices":[17,31]}],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"}],"search_metadata":{"completed_in":0.012,"max_id":414075829182676992,"max_id_str":"414075829182676992","next_results":"?max_id=414071361066532863&q=%23freebandnames&count=3&include_entities=1","query":"%23freebandnames","refresh_url":"?since_id=414075829182676992&q=%23freebandnames&include_entities=1","count":3,"since_id":0,"since_id_str":"0"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"statuses":[{"metadata":{"result_type":"recent","iso_language_code":"en"},"created_at":"Fri Dec 20 16:24:22 +0000 2013","id":414068770484019200,"id_str":"414068770484019200","text":"The Thumb Dumpsters #FreeBandNames","source":"\u003ca href=\"http:\/\/www.myplume.com\/\" rel=\"nofollow\"\u003ePlume\u00a0for\u00a0Android\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":29296581,"id_str":"29296581","name":"Reboot","screen_name":"Just_Reboot","location":"NC","description":"G+ http:\/\/t.co\/MyXmhCAtnD\r\n#TeamKang PR, Attempted Writer, IT Tech, Social Media Berserker and Entertainer, Adjectives, Assertions, Disclaimers","url":null,"entities":{"description":{"urls":[{"url":"http:\/\/t.co\/MyXmhCAtnD","expanded_url":"http:\/\/goo.gl\/giVTc","display_url":"goo.gl\/giVTc","indices":[3,25]}]}},"protected":false,"followers_count":2244,"friends_count":435,"listed_count":60,"created_at":"Mon Apr 06 21:21:27 +0000 2009","favourites_count":79,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":27703,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"131516","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/871578268\/5db26751bf732750f5ca1ed4f9f59309.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/871578268\/5db26751bf732750f5ca1ed4f9f59309.png","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/378800000480531175\/93e8b5cb95a635ebb81302f5b6044a76_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/378800000480531175\/93e8b5cb95a635ebb81302f5b6044a76_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/29296581\/1368898490","profile_link_color":"009999","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"EFEFEF","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"FreeBandNames","indices":[20,34]}],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"},{"metadata":{"result_type":"recent","iso_language_code":"en"},"created_at":"Fri Dec 20 05:23:19 +0000 2013","id":413902412236083201,"id_str":"413902412236083201","text":"The Shit Smelters #freebandnames","source":"web","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":41614761,"id_str":"41614761","name":"Grizzlam","screen_name":"mattyp90","location":"","description":"Chicago via Nashville via Memphis","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":585,"friends_count":745,"listed_count":8,"created_at":"Thu May 21 16:05:09 +0000 2009","favourites_count":9873,"utc_offset":-21600,"time_zone":"Central Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":13716,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"1A1B1F","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme9\/bg.gif","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme9\/bg.gif","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/378800000726393028\/b17facdd394b0992dad251e3cc6b3f60_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/378800000726393028\/b17facdd394b0992dad251e3cc6b3f60_normal.png","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/41614761\/1375052004","profile_link_color":"2FC2EF","profile_sidebar_border_color":"181A1E","profile_sidebar_fill_color":"252429","profile_text_color":"666666","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"freebandnames","indices":[18,32]}],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"},{"metadata":{"result_type":"recent","iso_language_code":"en"},"created_at":"Tue Dec 17 17:04:32 +0000 2013","id":412991713435975680,"id_str":"412991713435975680","text":"Big yellow moon #skyatnight #freebandnames","source":"\u003ca href=\"http:\/\/twitter.com\/download\/android\" rel=\"nofollow\"\u003eTwitter for Android\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":352463222,"id_str":"352463222","name":"Dean Weston","screen_name":"thehatsofdean","location":"Leicester","description":"Creative web designer & East Midlands hat wearer of the year 1993","url":"http:\/\/t.co\/l2Sn5tMK5W","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/l2Sn5tMK5W","expanded_url":"http:\/\/www.deanweston.co.uk","display_url":"deanweston.co.uk","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":37,"friends_count":68,"listed_count":0,"created_at":"Wed Aug 10 17:16:14 +0000 2011","favourites_count":5,"utc_offset":0,"time_zone":"London","geo_enabled":true,"verified":false,"statuses_count":914,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EDE1B3","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/308734021\/twitter_bg.gif","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/308734021\/twitter_bg.gif","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2796373361\/83a960755f87b2557a44da86a11da9e4_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2796373361\/83a960755f87b2557a44da86a11da9e4_normal.png","profile_link_color":"993300","profile_sidebar_border_color":"ADA47E","profile_sidebar_fill_color":"D1C69D","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"skyatnight","indices":[16,27]},{"text":"freebandnames","indices":[28,42]}],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"}],"search_metadata":{"completed_in":0.072,"max_id":414068770484019200,"max_id_str":"414068770484019200","query":"%23freebandnames","refresh_url":"?since_id=414068770484019200&q=%23freebandnames&include_entities=1","count":15,"since_id":0,"since_id_str":"0"}}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{"friends":[488736931,311444249]}
|
|
2
2
|
{"created_at":"Wed Apr 06 19:13:37 +0000 2011","id":55709764298092545,"id_str":"55709764298092545","text":"The problem with your code is that it's doing exactly what you told it to do.","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":7505382,"id_str":"7505382","name":"Erik Michaels-Ober","screen_name":"sferik","location":"San Francisco","description":"Write code. Not too much. Mostly Ruby.","url":"https:\/\/github.com\/sferik","entities":{"url":{"urls":[{"url":"https:\/\/github.com\/sferik","expanded_url":null,"indices":[0,25]}]},"description":{"urls":[]}},"protected":false,"followers_count":2479,"friends_count":200,"listed_count":132,"created_at":"Mon Jul 16 12:59:01 +0000 2007","favourites_count":4421,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":8730,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/677717672\/bb0b3653dcf0644e344823e0a2eb3382.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/677717672\/bb0b3653dcf0644e344823e0a2eb3382.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/7505382\/1349499693","profile_link_color":"0084B4","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":{"type":"Point","coordinates":[37.78349999,-122.39362884]},"coordinates":{"type":"Point","coordinates":[-122.39362884,37.78349999]},"place":{"id":"5c92ab5379de3839","url":"https:\/\/api.twitter.com\/1.1\/geo\/id\/5c92ab5379de3839.json","place_type":"neighborhood","name":"South Beach","full_name":"South Beach, San Francisco","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-122.403482,37.777529],[-122.387436,37.777529],[-122.387436,37.794486],[-122.403482,37.794486]]]},"attributes":{}},"contributors":null,"retweet_count":316,"entities":{"hashtags":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false}
|
|
3
|
-
{"created_at":"Wed Apr 06 19:13:37 +0000 2011","id":55709764298092545,"id_str":"55709764298092545","text":"The problem with your code is that it's doing exactly what you told it to do.","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":7505382,"id_str":"7505382","name":"Erik Michaels-Ober","screen_name":"sferik","location":"San Francisco","description":"Write code. Not too much. Mostly Ruby.","url":"https:\/\/github.com\/sferik","entities":{"url":{"urls":[{"url":"https:\/\/github.com\/sferik","expanded_url":null,"indices":[0,25]}]},"description":{"urls":[]}},"protected":false,"followers_count":2479,"friends_count":200,"listed_count":132,"created_at":"Mon Jul 16 12:59:01 +0000 2007","favourites_count":4421,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":8730,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/677717672\/bb0b3653dcf0644e344823e0a2eb3382.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/677717672\/bb0b3653dcf0644e344823e0a2eb3382.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1759857427\/image1326743606_normal.png","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/7505382\/1349499693","profile_link_color":"0084B4","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":{"type":"Point","coordinates":[37.78349999,-122.39362884]},"coordinates":{"type":"Point","coordinates":[-122.39362884,37.78349999]},"place":{"id":"5c92ab5379de3839","url":"https:\/\/api.twitter.com\/1.1\/geo\/id\/5c92ab5379de3839.json","place_type":"neighborhood","name":"South Beach","full_name":"South Beach, San Francisco","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-122.403482,37.777529],[-122.387436,37.777529],[-122.387436,37.794486],[-122.403482,37.794486]]]},"attributes":{}},"contributors":null,"retweet_count":316,"entities":{"hashtags":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false}
|
|
4
3
|
{"direct_message":{"id":389327745617891328,"id_str":"389327745617891328","text":"hello bot","sender":{"id":10083602,"id_str":"10083602","name":"Adam Bird","screen_name":"adambird","location":"Nottingham, UK","url":"http:\/\/about.me\/adambird", "description":"CEO @onediaryapp, ex @esendex CTO and co-founder, still cycling","protected":false,"followers_count":1286,"friends_count":850,"listed_count":51,"created_at":"Fri Nov 09 00:35:12 +0000 2007","favourites_count":93,"utc_offset":3600,"time_zone":"London","geo_enabled":true,"verified":false,"statuses_count":13480,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000477232297\/23d85bb78f71534eea1e1133fb771f86_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000477232297\/23d85bb78f71534eea1e1133fb771f86_normal.jpeg","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"sender_id":10083602,"sender_id_str":"10083602","sender_screen_name":"adambird","recipient":{"id":1292911088,"id_str":"1292911088","name":"One Diary Bot","screen_name":"onediarybot","location":"","url":"http:\/\/www.onediary.com","description":"I'm the One Diary bot, here to help you with your life including personal cycling weather forecasts.","protected":false,"followers_count":113,"friends_count":148,"listed_count":1,"created_at":"Sat Mar 23 23:52:18 +0000 2013","favourites_count":0,"utc_offset":"","time_zone":"","geo_enabled":false,"verified":false,"statuses_count":7919,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/3651575369\/090551d8dd92080198f707769239ff43_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/3651575369\/090551d8dd92080198f707769239ff43_normal.jpeg","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"recipient_id":1292911088,"recipient_id_str":"1292911088","recipient_screen_name":"onediarybot","created_at":"Sun Oct 13 09:52:22 +0000 2013","entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[]}}}
|
|
5
4
|
{"event":"follow","source":{"id":10083602,"id_str":"10083602","name":"Adam Bird","screen_name":"adambird","location":"Nottingham, UK","url":"http://t.co/M1eaIKDQyz","description":"CEO @onediaryapp, ex @esendex CTO and co-founder, still cycling","protected":false,"followers_count":1295,"friends_count":850,"listed_count":53,"created_at":"Fri Nov 09 00:35:12 +0000 2007","favourites_count":93,"utc_offset":0,"time_zone":"London","geo_enabled":true,"verified":false,"statuses_count":13507,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http://abs.twimg.com/images/themes/theme1/bg.png","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme1/bg.png","profile_background_tile":false,"profile_image_url":"http://pbs.twimg.com/profile_images/378800000477232297/23d85bb78f71534eea1e1133fb771f86_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/profile_images/378800000477232297/23d85bb78f71534eea1e1133fb771f86_normal.jpeg","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"target":{"id":1292911088,"id_str":"1292911088","name":"One Diary Bot","screen_name":"onediarybot","location":null,"url":"http://t.co/etHGc0xHX4","description":"I'm the One Diary bot, here to help you with your life including personal cycling weather forecasts.","protected":false,"followers_count":123,"friends_count":157,"listed_count":1,"created_at":"Sat Mar 23 23:52:18 +0000 2013","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":false,"statuses_count":9637,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http://abs.twimg.com/images/themes/theme1/bg.png","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme1/bg.png","profile_background_tile":false,"profile_image_url":"http://pbs.twimg.com/profile_images/3651575369/090551d8dd92080198f707769239ff43_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/profile_images/3651575369/090551d8dd92080198f707769239ff43_normal.jpeg","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"created_at":"Sun Oct 27 20:35:25 +0000 2013"}
|
|
5
|
+
{"delete":{"status":{"id":272691609211117568,"user_id":478569062,"id_str":"272691609211117568","user_id_str":"478569062","deleted":true}}}
|
|
6
|
+
{"warning":{"code":"FALLING_BEHIND","message":"Your connection is falling behind and messages are being queued for delivery to you. Your queue is now over 60% full. You will be disconnected when the queue is full.","percent_full":60}}
|
data/spec/helper.rb
CHANGED
|
@@ -5,7 +5,11 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
|
5
5
|
SimpleCov::Formatter::HTMLFormatter,
|
|
6
6
|
Coveralls::SimpleCov::Formatter
|
|
7
7
|
]
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
SimpleCov.start do
|
|
10
|
+
add_filter '/spec/'
|
|
11
|
+
minimum_coverage(99.35)
|
|
12
|
+
end
|
|
9
13
|
|
|
10
14
|
require 'twitter'
|
|
11
15
|
require 'rspec'
|
|
@@ -55,7 +59,7 @@ def stub_put(path)
|
|
|
55
59
|
end
|
|
56
60
|
|
|
57
61
|
def fixture_path
|
|
58
|
-
File.expand_path(
|
|
62
|
+
File.expand_path('../fixtures', __FILE__)
|
|
59
63
|
end
|
|
60
64
|
|
|
61
65
|
def fixture(file)
|
data/spec/twitter/base_spec.rb
CHANGED
|
@@ -5,22 +5,22 @@ describe Twitter::Base do
|
|
|
5
5
|
@base = Twitter::Base.new(:id => 1)
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
describe
|
|
9
|
-
it
|
|
8
|
+
describe '#[]' do
|
|
9
|
+
it 'calls methods using [] with symbol' do
|
|
10
10
|
expect(@base[:object_id]).to be_an Integer
|
|
11
11
|
end
|
|
12
|
-
it
|
|
13
|
-
expect(@base[
|
|
12
|
+
it 'calls methods using [] with string' do
|
|
13
|
+
expect(@base['object_id']).to be_an Integer
|
|
14
14
|
end
|
|
15
|
-
it
|
|
15
|
+
it 'returns nil for missing method' do
|
|
16
16
|
expect(@base[:foo]).to be_nil
|
|
17
|
-
expect(@base[
|
|
17
|
+
expect(@base['foo']).to be_nil
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
describe
|
|
22
|
-
it
|
|
23
|
-
expect(@base.attrs).to eq(
|
|
21
|
+
describe '#attrs' do
|
|
22
|
+
it 'returns a hash of attributes' do
|
|
23
|
+
expect(@base.attrs).to eq(:id => 1)
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -2,18 +2,18 @@ require 'helper'
|
|
|
2
2
|
|
|
3
3
|
describe Twitter::BasicUser do
|
|
4
4
|
|
|
5
|
-
describe
|
|
6
|
-
it
|
|
7
|
-
saved_search = Twitter::BasicUser.new(:id => 1, :name =>
|
|
8
|
-
other = Twitter::BasicUser.new(:id => 1, :name =>
|
|
5
|
+
describe '#==' do
|
|
6
|
+
it 'returns true when objects IDs are the same' do
|
|
7
|
+
saved_search = Twitter::BasicUser.new(:id => 1, :name => 'foo')
|
|
8
|
+
other = Twitter::BasicUser.new(:id => 1, :name => 'bar')
|
|
9
9
|
expect(saved_search == other).to be true
|
|
10
10
|
end
|
|
11
|
-
it
|
|
11
|
+
it 'returns false when objects IDs are different' do
|
|
12
12
|
saved_search = Twitter::BasicUser.new(:id => 1)
|
|
13
13
|
other = Twitter::BasicUser.new(:id => 2)
|
|
14
14
|
expect(saved_search == other).to be false
|
|
15
15
|
end
|
|
16
|
-
it
|
|
16
|
+
it 'returns false when classes are different' do
|
|
17
17
|
saved_search = Twitter::BasicUser.new(:id => 1)
|
|
18
18
|
other = Twitter::Identity.new(:id => 1)
|
|
19
19
|
expect(saved_search == other).to be false
|
|
@@ -2,13 +2,13 @@ require 'helper'
|
|
|
2
2
|
|
|
3
3
|
describe Twitter::Configuration do
|
|
4
4
|
|
|
5
|
-
describe
|
|
6
|
-
it
|
|
7
|
-
photo_sizes = Twitter::Configuration.new(:photo_sizes => {:small => {:h => 226, :w => 340, :resize =>
|
|
5
|
+
describe '#photo_sizes' do
|
|
6
|
+
it 'returns a hash of sizes when photo_sizes is set' do
|
|
7
|
+
photo_sizes = Twitter::Configuration.new(:photo_sizes => {:small => {:h => 226, :w => 340, :resize => 'fit'}, :large => {:h => 466, :w => 700, :resize => 'fit'}, :medium => {:h => 399, :w => 600, :resize => 'fit'}, :thumb => {:h => 150, :w => 150, :resize => 'crop'}}).photo_sizes
|
|
8
8
|
expect(photo_sizes).to be_a Hash
|
|
9
9
|
expect(photo_sizes[:small]).to be_a Twitter::Size
|
|
10
10
|
end
|
|
11
|
-
it
|
|
11
|
+
it 'is empty when photo_sizes is not set' do
|
|
12
12
|
photo_sizes = Twitter::Configuration.new.photo_sizes
|
|
13
13
|
expect(photo_sizes).to be_empty
|
|
14
14
|
end
|
data/spec/twitter/cursor_spec.rb
CHANGED
|
@@ -2,67 +2,29 @@ require 'helper'
|
|
|
2
2
|
|
|
3
3
|
describe Twitter::Cursor do
|
|
4
4
|
|
|
5
|
-
describe
|
|
5
|
+
describe '#each' do
|
|
6
6
|
before do
|
|
7
|
-
@client = Twitter::REST::Client.new(:consumer_key =>
|
|
8
|
-
stub_get(
|
|
9
|
-
stub_get(
|
|
7
|
+
@client = Twitter::REST::Client.new(:consumer_key => 'CK', :consumer_secret => 'CS', :access_token => 'AT', :access_token_secret => 'AS')
|
|
8
|
+
stub_get('/1.1/followers/ids.json').with(:query => {:cursor => '-1', :screen_name => 'sferik'}).to_return(:body => fixture('ids_list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
|
9
|
+
stub_get('/1.1/followers/ids.json').with(:query => {:cursor => '1305102810874389703', :screen_name => 'sferik'}).to_return(:body => fixture('ids_list2.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
|
10
10
|
end
|
|
11
|
-
it
|
|
12
|
-
@client.follower_ids(
|
|
13
|
-
expect(a_get(
|
|
14
|
-
expect(a_get(
|
|
11
|
+
it 'requests the correct resources' do
|
|
12
|
+
@client.follower_ids('sferik').each {}
|
|
13
|
+
expect(a_get('/1.1/followers/ids.json').with(:query => {:cursor => '-1', :screen_name => 'sferik'})).to have_been_made
|
|
14
|
+
expect(a_get('/1.1/followers/ids.json').with(:query => {:cursor => '1305102810874389703', :screen_name => 'sferik'})).to have_been_made
|
|
15
15
|
end
|
|
16
|
-
it
|
|
16
|
+
it 'iterates' do
|
|
17
17
|
count = 0
|
|
18
|
-
@client.follower_ids(
|
|
18
|
+
@client.follower_ids('sferik').each { count += 1 }
|
|
19
19
|
expect(count).to eq(6)
|
|
20
20
|
end
|
|
21
|
-
context
|
|
22
|
-
it
|
|
21
|
+
context 'with start' do
|
|
22
|
+
it 'iterates' do
|
|
23
23
|
count = 0
|
|
24
|
-
@client.follower_ids(
|
|
24
|
+
@client.follower_ids('sferik').each(5) { count += 1 }
|
|
25
25
|
expect(count).to eq(1)
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe "#first?" do
|
|
31
|
-
context "when previous cursor equals zero" do
|
|
32
|
-
before do
|
|
33
|
-
@cursor = Twitter::Cursor.new({:previous_cursor => 0}, :ids, nil, Twitter::REST::Client.new, :get, "/1.1/followers/ids.json", {})
|
|
34
|
-
end
|
|
35
|
-
it "returns true" do
|
|
36
|
-
expect(@cursor.first?).to be true
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
context "when previous cursor does not equal zero" do
|
|
40
|
-
before do
|
|
41
|
-
@cursor = Twitter::Cursor.new({:previous_cursor => 1}, :ids, nil, Twitter::REST::Client.new, :get, "/1.1/followers/ids.json", {})
|
|
42
|
-
end
|
|
43
|
-
it "returns true" do
|
|
44
|
-
expect(@cursor.first?).to be false
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
describe "#last?" do
|
|
50
|
-
context "when next cursor equals zero" do
|
|
51
|
-
before do
|
|
52
|
-
@cursor = Twitter::Cursor.new({:next_cursor => 0}, :ids, nil, Twitter::REST::Client.new, :get, "/1.1/followers/ids.json", {})
|
|
53
|
-
end
|
|
54
|
-
it "returns true" do
|
|
55
|
-
expect(@cursor.last?).to be true
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
context "when next cursor does not equal zero" do
|
|
59
|
-
before do
|
|
60
|
-
@cursor = Twitter::Cursor.new({:next_cursor => 1}, :ids, nil, Twitter::REST::Client.new, :get, "/1.1/followers/ids.json", {})
|
|
61
|
-
end
|
|
62
|
-
it "returns false" do
|
|
63
|
-
expect(@cursor.last?).to be false
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
|
|
68
30
|
end
|
|
@@ -2,86 +2,86 @@ require 'helper'
|
|
|
2
2
|
|
|
3
3
|
describe Twitter::DirectMessage do
|
|
4
4
|
|
|
5
|
-
describe
|
|
6
|
-
it
|
|
7
|
-
direct_message = Twitter::DirectMessage.new(:id => 1, :text =>
|
|
8
|
-
other = Twitter::DirectMessage.new(:id => 1, :text =>
|
|
5
|
+
describe '#==' do
|
|
6
|
+
it 'returns true when objects IDs are the same' do
|
|
7
|
+
direct_message = Twitter::DirectMessage.new(:id => 1, :text => 'foo')
|
|
8
|
+
other = Twitter::DirectMessage.new(:id => 1, :text => 'bar')
|
|
9
9
|
expect(direct_message == other).to be true
|
|
10
10
|
end
|
|
11
|
-
it
|
|
11
|
+
it 'returns false when objects IDs are different' do
|
|
12
12
|
direct_message = Twitter::DirectMessage.new(:id => 1)
|
|
13
13
|
other = Twitter::DirectMessage.new(:id => 2)
|
|
14
14
|
expect(direct_message == other).to be false
|
|
15
15
|
end
|
|
16
|
-
it
|
|
16
|
+
it 'returns false when classes are different' do
|
|
17
17
|
direct_message = Twitter::DirectMessage.new(:id => 1)
|
|
18
18
|
other = Twitter::Identity.new(:id => 1)
|
|
19
19
|
expect(direct_message == other).to be false
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
describe
|
|
24
|
-
it
|
|
25
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
23
|
+
describe '#created_at' do
|
|
24
|
+
it 'returns a Time when created_at is set' do
|
|
25
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345, :created_at => 'Mon Jul 16 12:59:01 +0000 2007')
|
|
26
26
|
expect(direct_message.created_at).to be_a Time
|
|
27
27
|
end
|
|
28
|
-
it
|
|
29
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
28
|
+
it 'returns nil when created_at is not set' do
|
|
29
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345)
|
|
30
30
|
expect(direct_message.created_at).to be_nil
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
describe
|
|
35
|
-
it
|
|
36
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
34
|
+
describe '#created?' do
|
|
35
|
+
it 'returns true when created_at is set' do
|
|
36
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345, :created_at => 'Mon Jul 16 12:59:01 +0000 2007')
|
|
37
37
|
expect(direct_message.created?).to be true
|
|
38
38
|
end
|
|
39
|
-
it
|
|
40
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
39
|
+
it 'returns false when created_at is not set' do
|
|
40
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345)
|
|
41
41
|
expect(direct_message.created?).to be false
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
describe
|
|
46
|
-
it
|
|
47
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
45
|
+
describe '#recipient' do
|
|
46
|
+
it 'returns a User when recipient is set' do
|
|
47
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345, :recipient => {:id => 7_505_382})
|
|
48
48
|
expect(direct_message.recipient).to be_a Twitter::User
|
|
49
49
|
end
|
|
50
|
-
it
|
|
51
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
50
|
+
it 'returns nil when recipient is not set' do
|
|
51
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345)
|
|
52
52
|
expect(direct_message.recipient).to be_nil
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
-
describe
|
|
57
|
-
it
|
|
58
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
56
|
+
describe '#recipient?' do
|
|
57
|
+
it 'returns true when recipient is set' do
|
|
58
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345, :recipient => {:id => 7_505_382})
|
|
59
59
|
expect(direct_message.recipient?).to be true
|
|
60
60
|
end
|
|
61
|
-
it
|
|
62
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
61
|
+
it 'returns false when recipient is not set' do
|
|
62
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345)
|
|
63
63
|
expect(direct_message.recipient?).to be false
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
-
describe
|
|
68
|
-
it
|
|
69
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
67
|
+
describe '#sender' do
|
|
68
|
+
it 'returns a User when sender is set' do
|
|
69
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345, :sender => {:id => 7_505_382})
|
|
70
70
|
expect(direct_message.sender).to be_a Twitter::User
|
|
71
71
|
end
|
|
72
|
-
it
|
|
73
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
72
|
+
it 'returns nil when sender is not set' do
|
|
73
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345)
|
|
74
74
|
expect(direct_message.sender).to be_nil
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
-
describe
|
|
79
|
-
it
|
|
80
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
78
|
+
describe '#sender?' do
|
|
79
|
+
it 'returns true when sender is set' do
|
|
80
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345, :sender => {:id => 7_505_382})
|
|
81
81
|
expect(direct_message.sender?).to be true
|
|
82
82
|
end
|
|
83
|
-
it
|
|
84
|
-
direct_message = Twitter::DirectMessage.new(:id =>
|
|
83
|
+
it 'returns false when sender is not set' do
|
|
84
|
+
direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345)
|
|
85
85
|
expect(direct_message.sender?).to be false
|
|
86
86
|
end
|
|
87
87
|
end
|