Class: Flickr::PhotoCollection
- Defined in:
- lib/acts_as_unvlogable/flickr.rb
Overview
A collection of photos is returned as a PhotoCollection, a subclass of Array. This allows us to retain the pagination info returned by Flickr and make it accessible in a friendly way
Instance Attribute Summary collapse
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
-
#perpage ⇒ Object
readonly
Returns the value of attribute perpage.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(photos_api_response = {}, api_key = nil) ⇒ PhotoCollection
constructor
builds a PhotoCollection from given params, such as those returned from photos.search API call.
Constructor Details
#initialize(photos_api_response = {}, api_key = nil) ⇒ PhotoCollection
builds a PhotoCollection from given params, such as those returned from photos.search API call
104 105 |
# File 'lib/acts_as_unvlogable/flickr.rb', line 104 def initialize(photos_api_response={}, api_key=nil) end |
Instance Attribute Details
#page ⇒ Object (readonly)
Returns the value of attribute page.
100 101 102 |
# File 'lib/acts_as_unvlogable/flickr.rb', line 100 def page @page end |
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
100 101 102 |
# File 'lib/acts_as_unvlogable/flickr.rb', line 100 def pages @pages end |
#perpage ⇒ Object (readonly)
Returns the value of attribute perpage.
100 101 102 |
# File 'lib/acts_as_unvlogable/flickr.rb', line 100 def perpage @perpage end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
100 101 102 |
# File 'lib/acts_as_unvlogable/flickr.rb', line 100 def total @total end |