Module: FbGraph::Connections::Albums

Included in:
Page, User
Defined in:
lib/fb_graph/connections/albums.rb

Instance Method Summary collapse

Instance Method Details

#album!(options = {}) ⇒ Object



11
12
13
14
# File 'lib/fb_graph/connections/albums.rb', line 11

def album!(options = {})
  album = post(options.merge(:connection => 'albums'))
  Album.new(album.delete(:id), options.merge(album))
end

#albums(options = {}) ⇒ Object



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

def albums(options = {})
  albums = FbGraph::Collection.new(get(options.merge(:connection => 'albums')))
  albums.map! do |album|
    Album.new(album.delete(:id), album)
  end
end