Class: FlickrawObjects::Photoset

Inherits:
Object
  • Object
show all
Includes:
Attributes
Defined in:
lib/flickraw_objects.rb

Constant Summary

Constants included from Attributes

Attributes::COERCIONS

Instance Attribute Summary

Attributes included from Attributes

#init

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Attributes

included, #initialize

Class Method Details

.find_by_id(id) ⇒ Object



62
63
64
# File 'lib/flickraw_objects.rb', line 62

def self.find_by_id(id)
  Photoset.new(flickr.photosets.getInfo photoset_id: id)
end

Instance Method Details

#get_infoObject



77
78
79
# File 'lib/flickraw_objects.rb', line 77

def get_info()
  @get_info ||= flickr.photosets.getInfo photoset_id: id
end

#get_photos(params = {}) ⇒ Object Also known as: photos



66
67
68
69
70
71
72
73
# File 'lib/flickraw_objects.rb', line 66

def get_photos(params = {})
  result = Array.new
  response = flickr.photosets.getPhotos(photoset_id: id)
  response["photo"].each do |photo|
    result << Photo.new(photo)
  end
  result
end