Class: Flickr::Photosets

Inherits:
Base show all
Defined in:
lib/flickr/photosets.rb

Defined Under Namespace

Classes: Photoset

Constant Summary

Constants inherited from Base

Base::AUTH_ENDPOINT, Base::REST_ENDPOINT, Base::UPLOAD_ENDPOINT

Instance Attribute Summary

Attributes inherited from Base

#api_key, #api_secret, #token, #token_cache

Instance Method Summary collapse

Methods inherited from Base

#attributes_hash, #auth, #contacts, #people, #photos, #photosets, #send_request, #sign_request, #test, #uploader, #urls

Constructor Details

#initialize(flickr) ⇒ Photosets

Returns a new instance of Photosets.



2
3
4
# File 'lib/flickr/photosets.rb', line 2

def initialize(flickr)
  @flickr = flickr
end

Instance Method Details

#get_info(options = {}) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/flickr/photosets.rb', line 13

def get_info(options={})
  return nil unless options[:photoset_id]
  rsp = @flickr.send_request('flickr.photosets.getInfo', options)
  return nil unless rsp
  photoset = nil
  if rsp.photoset
    attributes = create_attributes(rsp.photoset)
    photoset = Photoset.new(@flickr, attributes)
  end
  return photoset
end

#get_list(options = {}) ⇒ Object

Get the authorized user’s contact list.



8
9
10
11
# File 'lib/flickr/photosets.rb', line 8

def get_list(options={})
  rsp = @flickr.send_request('flickr.photosets.getList', options)
  collect_photosets(rsp)
end