Module: GSGraph::Connections::Albums

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

Instance Method Summary collapse

Instance Method Details

#album!(options = {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/gs_graph/connections/albums.rb', line 13

def album!(options = {})
  album = post options.merge(:connection => :albums)
  Album.new album[:id], options.merge(album).merge(
    :access_token => options[:access_token] || self.access_token
  )
end

#albums(options = {}) ⇒ Object



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

def albums(options = {})
  albums = self.connection :albums, options
  albums.map! do |album|
    Album.new album[:id], album.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end