Class: FbGraph::Album

Inherits:
Node
  • Object
show all
Includes:
Connections::Comments, Connections::Photos
Defined in:
lib/fb_graph/album.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#access_token, #endpoint, #identifier

Instance Method Summary collapse

Methods included from Connections::Comments

#comments

Methods included from Connections::Photos

#photos

Methods inherited from Node

#fetch, fetch

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
# File 'lib/fb_graph/album.rb', line 8

def initialize(identifier, options = {})
  super
  if (from = options[:from])
    @from = if from[:category]
      FbGraph::Page.new(from.delete(:id), from) 
    else
      FbGraph::User.new(from.delete(:id), from) 
    end
  end
  @name         = options[:name]
  @description  = options[:description]
  @location     = options[:location]
  @link         = options[:link]
  @count        = options[:count]
  @created_time = options[:created_time]
  @updated_time = options[:updated_time]
end

Instance Attribute Details

#countObject

Returns the value of attribute count.



6
7
8
# File 'lib/fb_graph/album.rb', line 6

def count
  @count
end

#created_timeObject

Returns the value of attribute created_time.



6
7
8
# File 'lib/fb_graph/album.rb', line 6

def created_time
  @created_time
end

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/fb_graph/album.rb', line 6

def description
  @description
end

#fromObject

Returns the value of attribute from.



6
7
8
# File 'lib/fb_graph/album.rb', line 6

def from
  @from
end

Returns the value of attribute link.



6
7
8
# File 'lib/fb_graph/album.rb', line 6

def link
  @link
end

#locationObject

Returns the value of attribute location.



6
7
8
# File 'lib/fb_graph/album.rb', line 6

def location
  @location
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/fb_graph/album.rb', line 6

def name
  @name
end

#updated_timeObject

Returns the value of attribute updated_time.



6
7
8
# File 'lib/fb_graph/album.rb', line 6

def updated_time
  @updated_time
end