Class: Flickr::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/flickr/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#authoridObject

Returns the value of attribute authorid.



798
799
800
# File 'lib/flickr/base.rb', line 798

def authorid
  @authorid
end

#authornameObject

Returns the value of attribute authorname.



798
799
800
# File 'lib/flickr/base.rb', line 798

def authorname
  @authorname
end

#datecreatedObject

Returns the value of attribute datecreated.



798
799
800
# File 'lib/flickr/base.rb', line 798

def datecreated
  @datecreated
end

#idObject

Returns the value of attribute id.



798
799
800
# File 'lib/flickr/base.rb', line 798

def id
  @id
end

Returns the value of attribute permalink.



798
799
800
# File 'lib/flickr/base.rb', line 798

def permalink
  @permalink
end

#textObject

Returns the value of attribute text.



798
799
800
# File 'lib/flickr/base.rb', line 798

def text
  @text
end

Class Method Details

.from_xml(xml, flickr = nil) ⇒ Object



800
801
802
803
804
805
806
807
808
809
810
# File 'lib/flickr/base.rb', line 800

def self.from_xml(xml, flickr=nil)
	att = xml.attributes
	c = new
	c.id = att['id']
	c.authorid = att['author']
	c.authorname = att['authorname']
	c.datecreated = Time.at(att['datecreate'].to_i)
	c.permalink = att['permalink']
	c.text = xml.text
	c
end