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

#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

#create(title, primary_photo_id, options = {}) ⇒ Object

required: title primary_photo_id



17
18
19
20
# File 'lib/flickr/photosets.rb', line 17

def create(title, primary_photo_id, options={})
  options.merge!({:title => title, :primary_photo_id => primary_photo_id})
  @flickr.send_request('flickr.photosets.create', options)
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