Class: Orange::FlickrResource
- Inherits:
-
Resource
- Object
- Resource
- Orange::FlickrResource
- Defined in:
- lib/orange-flickr/resources/flickr_resource.rb
Instance Method Summary collapse
- #exposed(packet) ⇒ Object
- #gallery(packet, opts = {}) ⇒ Object
- #photosets(packet, opts = {}) ⇒ Object
- #stack_init ⇒ Object
Instance Method Details
#exposed(packet) ⇒ Object
8 |
# File 'lib/orange-flickr/resources/flickr_resource.rb', line 8 def exposed(packet); [:galleries, :show]; end |
#gallery(packet, opts = {}) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/orange-flickr/resources/flickr_resource.rb', line 25 def gallery(packet, opts = {}) if ["flickr_nsid"] sets_url = FlickRaw::URL_PHOTOSTREAM + ["flickr_nsid"] + "/sets" else false end end |
#photosets(packet, opts = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/orange-flickr/resources/flickr_resource.rb', line 15 def photosets(packet, opts = {}) if FlickRaw.api_key && ["flickr_nsid"] ret = {} sets = flickr.photosets.getList(:user_id => ["flickr_nsid"]) sets else false end end |
#stack_init ⇒ Object
10 11 12 13 |
# File 'lib/orange-flickr/resources/flickr_resource.rb', line 10 def stack_init FlickRaw.api_key = orange.["flickr_api_key"] || "d25ed6ad71472b633b11544a21da4f36" ["flickr_nsid"] = orange.["flickr_nsid"] || false end |