Class: FbGraph::Album
- Includes:
- Connections::Comments, Connections::Photos
- Defined in:
- lib/fb_graph/album.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#created_time ⇒ Object
Returns the value of attribute created_time.
-
#description ⇒ Object
Returns the value of attribute description.
-
#from ⇒ Object
Returns the value of attribute from.
-
#link ⇒ Object
Returns the value of attribute link.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#updated_time ⇒ Object
Returns the value of attribute updated_time.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, options = {}) ⇒ Album
constructor
A new instance of Album.
Methods included from Connections::Comments
Methods included from Connections::Photos
Methods inherited from Node
Methods included from Comparison
Constructor Details
#initialize(identifier, options = {}) ⇒ Album
Returns a new instance of Album.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fb_graph/album.rb', line 8 def initialize(identifier, = {}) super if (from = [:from]) @from = if from[:category] FbGraph::Page.new(from.delete(:id), from) else FbGraph::User.new(from.delete(:id), from) end end @name = [:name] # NOTE: # for some reason, facebook uses different parameter names. # "description" in GET & "message" in POST @description = [:description] || [:message] @location = [:location] @link = [:link] @count = [:count] if [:created_time] @created_time = Time.parse([:created_time]).utc end if [:updated_time] @updated_time = Time.parse([:updated_time]).utc end end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
6 7 8 |
# File 'lib/fb_graph/album.rb', line 6 def count @count end |
#created_time ⇒ Object
Returns the value of attribute created_time.
6 7 8 |
# File 'lib/fb_graph/album.rb', line 6 def created_time @created_time end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/fb_graph/album.rb', line 6 def description @description end |
#from ⇒ Object
Returns the value of attribute from.
6 7 8 |
# File 'lib/fb_graph/album.rb', line 6 def from @from end |
#link ⇒ Object
Returns the value of attribute link.
6 7 8 |
# File 'lib/fb_graph/album.rb', line 6 def link @link end |
#location ⇒ Object
Returns the value of attribute location.
6 7 8 |
# File 'lib/fb_graph/album.rb', line 6 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/fb_graph/album.rb', line 6 def name @name end |
#updated_time ⇒ Object
Returns the value of attribute updated_time.
6 7 8 |
# File 'lib/fb_graph/album.rb', line 6 def updated_time @updated_time end |