twitter_kotoba 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/twitter_kotoba/twitter_connection.rb +3 -1
- data/twitter_kotoba.gemspec +1 -1
- metadata +1 -1
@@ -16,6 +16,8 @@ class TwitterConnection
|
|
16
16
|
requests = run_requests
|
17
17
|
tweets = process_requests(requests)
|
18
18
|
|
19
|
+
# if any of the requests return anything but 200 try again
|
20
|
+
|
19
21
|
return tweets.flatten
|
20
22
|
end
|
21
23
|
|
@@ -29,7 +31,7 @@ class TwitterConnection
|
|
29
31
|
twitter_hydra = Typhoeus::Hydra.new
|
30
32
|
|
31
33
|
(0..4).each do |req|
|
32
|
-
requests[req] = Typhoeus::Request.new("http://twitter.com/statuses/user_timeline.json?screen_name=#{@user}&count=200&page=#{req+1}")
|
34
|
+
requests[req] = Typhoeus::Request.new("http://api.twitter.com/1/statuses/user_timeline.json?screen_name=#{@user}&count=200&page=#{req+1}")
|
33
35
|
requests[req].timeout = 10000 # 10 seconds max
|
34
36
|
twitter_hydra.queue requests[req]
|
35
37
|
end
|
data/twitter_kotoba.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'twitter_kotoba'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.3'
|
4
4
|
s.date = '2012-09-04'
|
5
5
|
s.summary = "Shows word frequency of a user's last 1000 tweets."
|
6
6
|
s.description = "Twitter Kotoba gets a user's last 1000 tweets and prints the frequency of each word in descending order."
|