Class: Picasa::User
- Inherits:
-
Object
- Object
- Picasa::User
- Defined in:
- lib/picasa/user.rb
Instance Method Summary collapse
- #albums ⇒ Object
-
#initialize(google_user) ⇒ User
constructor
A new instance of User.
- #photos(options = {}) ⇒ Object
- #photos_by_tags(tags) ⇒ Object
Constructor Details
#initialize(google_user) ⇒ User
Returns a new instance of User.
3 4 5 6 |
# File 'lib/picasa/user.rb', line 3 def initialize(google_user) raise ArgumentError.new("You must specify a google user") unless google_user @google_user = google_user end |
Instance Method Details
#albums ⇒ Object
8 9 10 |
# File 'lib/picasa/user.rb', line 8 def albums @albums ||= Picasa::Album.all(@google_user) end |
#photos(options = {}) ⇒ Object
12 13 14 15 |
# File 'lib/picasa/user.rb', line 12 def photos( = {}) raise ArgumentError.new("You must specify album_id") unless [:album_id] Picasa::Photo.find_all_by_album_id(@google_user, [:album_id]) end |