Class: Flickr::Photosets::Photoset
Instance Attribute Summary collapse
-
#comments ⇒ Object
comment attributes.
-
#description ⇒ Object
Returns the value of attribute description.
-
#farm ⇒ Object
Returns the value of attribute farm.
-
#id ⇒ Object
Returns the value of attribute id.
-
#num_photos ⇒ Object
Returns the value of attribute num_photos.
-
#primary ⇒ Object
Returns the value of attribute primary.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#server ⇒ Object
Returns the value of attribute server.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #add_comment(message) ⇒ Object
- #get_photos(options = {}) ⇒ Object
-
#initialize(flickr, attributes) ⇒ Photoset
constructor
A new instance of Photoset.
Constructor Details
#initialize(flickr, attributes) ⇒ Photoset
Returns a new instance of Photoset.
5 6 7 8 9 10 |
# File 'lib/flickr/photoset.rb', line 5 def initialize(flickr, attributes) @flickr = flickr attributes.each do |k,v| send("#{k}=", v) end end |
Instance Attribute Details
#comments ⇒ Object
comment attributes
3 4 5 |
# File 'lib/flickr/photoset.rb', line 3 def comments @comments end |
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/flickr/photoset.rb', line 2 def description @description end |
#farm ⇒ Object
Returns the value of attribute farm.
2 3 4 |
# File 'lib/flickr/photoset.rb', line 2 def farm @farm end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/flickr/photoset.rb', line 2 def id @id end |
#num_photos ⇒ Object
Returns the value of attribute num_photos.
2 3 4 |
# File 'lib/flickr/photoset.rb', line 2 def num_photos @num_photos end |
#primary ⇒ Object
Returns the value of attribute primary.
2 3 4 |
# File 'lib/flickr/photoset.rb', line 2 def primary @primary end |
#secret ⇒ Object
Returns the value of attribute secret.
2 3 4 |
# File 'lib/flickr/photoset.rb', line 2 def secret @secret end |
#server ⇒ Object
Returns the value of attribute server.
2 3 4 |
# File 'lib/flickr/photoset.rb', line 2 def server @server end |
#title ⇒ Object
Returns the value of attribute title.
2 3 4 |
# File 'lib/flickr/photoset.rb', line 2 def title @title end |
Instance Method Details
#add_comment(message) ⇒ Object
18 19 20 21 |
# File 'lib/flickr/photoset.rb', line 18 def add_comment() @flickr.send_request('flickr.photosets.comments.addComment',{:photoset_id => self.id, :comment_text => }, :post) true end |
#get_photos(options = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/flickr/photoset.rb', line 12 def get_photos(={}) = .merge(:photoset_id=>id) rsp = @flickr.send_request('flickr.photosets.getPhotos', ) collect_photos(rsp) end |