twitter-photos 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/twitter-photos.rb +3 -8
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/lib/twitter-photos.rb
CHANGED
@@ -33,13 +33,8 @@ class TwitterPhoto
|
|
33
33
|
found.sort_by {|x| x.date}
|
34
34
|
end
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
# TwitterPhoto.delete('bookis')
|
39
|
-
# @param [String] username
|
40
|
-
|
41
|
-
def delete(username)
|
42
|
-
TwitterPhoto.find_by_username(username).each{|x| x=nil}
|
36
|
+
def self.delete_all
|
37
|
+
ObjectSpace.each_object(TwitterPhoto) {|o| o = nil}
|
43
38
|
end
|
44
39
|
|
45
40
|
# Fetch photos from Twitpic, yFrog, Twitgoo, and TweetPhoto.
|
@@ -58,7 +53,7 @@ class TwitterPhoto
|
|
58
53
|
# @param [Hash] options
|
59
54
|
# exclude photo services (optional)
|
60
55
|
def self.get_photos_by(username, options={:twitpic => true, :yfrog => true, :tweetphoto => true, :twitgoo => true})
|
61
|
-
TwitterPhoto.
|
56
|
+
TwitterPhoto.delete_all
|
62
57
|
hydra = Typhoeus::Hydra.new
|
63
58
|
|
64
59
|
twitpic_request = Typhoeus::Request.new("#{TWITPIC_URL}/photos/#{username}", :timeout => 5000)
|