twitter-photos 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.rdoc +1 -1
  2. data/VERSION +1 -1
  3. data/lib/twitter-photos.rb +10 -1
  4. metadata +2 -2
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = twitter-photos
2
2
 
3
- Description goes here.
3
+ A simple gem to retrieve photos from Twitpic, yFrog, TweetPhoto, and TwitGoo using any twitter username
4
4
 
5
5
  == Note on Patches/Pull Requests
6
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -33,6 +33,15 @@ class TwitterPhoto
33
33
  found.sort_by {|x| x.date}
34
34
  end
35
35
 
36
+ # Delete all TwitterPhoto objects with the username of the given value.
37
+ # @example Delete all TwitterPhoto objects where the username == 'bookis'
38
+ # TwitterPhoto.delete('bookis')
39
+ # @param [String] username
40
+
41
+ def delete(username)
42
+ TwitterPhoto.find_by_username(username).each{|x| x=nil}
43
+ end
44
+
36
45
  # Fetch photos from Twitpic, yFrog, Twitgoo, and TweetPhoto.
37
46
  #
38
47
  # @example Find photos by @bookis only from yfrog and twitpic
@@ -49,7 +58,7 @@ class TwitterPhoto
49
58
  # @param [Hash] options
50
59
  # exclude photo services (optional)
51
60
  def self.get_photos_by(username, options={:twitpic => true, :yfrog => true, :tweetphoto => true, :twitgoo => true})
52
- @pix = []
61
+ TwitterPhoto.delete(username)
53
62
  hydra = Typhoeus::Hydra.new
54
63
 
55
64
  twitpic_request = Typhoeus::Request.new("#{TWITPIC_URL}/photos/#{username}", :timeout => 5000)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - bookis