Class: Flickr::Photoset
- Inherits:
-
Object
- Object
- Flickr::Photoset
- Defined in:
- lib/flickr.rb
Overview
Todo: flickr.photosets.delete flickr.photosets.editMeta flickr.photosets.editPhotos flickr.photosets.getContext flickr.photosets.getInfo flickr.photosets.getPhotos
Instance Attribute Summary (collapse)
-
- (Object) client
readonly
Returns the value of attribute client.
-
- (Object) description
readonly
Returns the value of attribute description.
-
- (Object) id
readonly
Returns the value of attribute id.
-
- (Object) owner
readonly
Returns the value of attribute owner.
-
- (Object) photos
readonly
Returns the value of attribute photos.
-
- (Object) primary
readonly
Returns the value of attribute primary.
-
- (Object) title
readonly
Returns the value of attribute title.
-
- (Object) url
readonly
Returns the value of attribute url.
Instance Method Summary (collapse)
-
- (Object) getInfo
Implements flickr.photosets.getInfo private, once we can call it as needed.
- - (Object) getPhotos
-
- (Photoset) initialize(id = nil, api_key = {})
constructor
A new instance of Photoset.
Constructor Details
- (Photoset) initialize(id = nil, api_key = {})
Returns a new instance of Photoset
722 723 724 725 726 |
# File 'lib/flickr.rb', line 722 def initialize(id=nil, api_key={}) @id = id @api_key = api_key @client = Flickr.new @api_key end |
Instance Attribute Details
- (Object) client (readonly)
Returns the value of attribute client
720 721 722 |
# File 'lib/flickr.rb', line 720 def client @client end |
- (Object) description (readonly)
Returns the value of attribute description
720 721 722 |
# File 'lib/flickr.rb', line 720 def description @description end |
- (Object) id (readonly)
Returns the value of attribute id
720 721 722 |
# File 'lib/flickr.rb', line 720 def id @id end |
- (Object) owner (readonly)
Returns the value of attribute owner
720 721 722 |
# File 'lib/flickr.rb', line 720 def owner @owner end |
- (Object) photos (readonly)
Returns the value of attribute photos
720 721 722 |
# File 'lib/flickr.rb', line 720 def photos @photos end |
- (Object) primary (readonly)
Returns the value of attribute primary
720 721 722 |
# File 'lib/flickr.rb', line 720 def primary @primary end |
- (Object) title (readonly)
Returns the value of attribute title
720 721 722 |
# File 'lib/flickr.rb', line 720 def title @title end |
- (Object) url (readonly)
Returns the value of attribute url
720 721 722 |
# File 'lib/flickr.rb', line 720 def url @url end |
Instance Method Details
- (Object) getInfo
Implements flickr.photosets.getInfo private, once we can call it as needed
730 731 732 733 734 735 736 737 738 739 |
# File 'lib/flickr.rb', line 730 def getInfo info = @client.photosets_getInfo('photoset_id'=>@id)['photoset'] @owner = User.new(info['owner'], nil, nil, nil, @api_key) @primary = info['primary'] @photos = info['photos'] @title = info['title'] @description = info['description'] @url = "http://www.flickr.com/photos/#{@owner.getInfo.username}/sets/#{@id}/" self end |
- (Object) getPhotos
741 742 743 |
# File 'lib/flickr.rb', line 741 def getPhotos photosetPhotos = @client.photos_request('photosets.getPhotos', {'photoset_id' => @id}, "photoset") end |