Module: FbGraph2::Edge::Albums

Included in:
Page, User
Defined in:
lib/fb_graph2/edge/albums.rb

Instance Method Summary collapse

Instance Method Details

#album!(params = {}) ⇒ Object



11
12
13
14
# File 'lib/fb_graph2/edge/albums.rb', line 11

def album!(params = {})
  album = self.post params, edge: :albums
  Album.new(album[:id], params.merge(album)).authenticate self.access_token
end

#albums(params = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/fb_graph2/edge/albums.rb', line 4

def albums(params = {})
  albums = self.edge :albums, params
  albums.collect! do |album|
    Album.new(album[:id], album).authenticate self.access_token
  end
end