Sha256: 43781d348160e681e5dc72d8c158c7bff79ef246bcf1733026e77964e1378d6d

Contents?: true

Size: 629 Bytes

Versions: 4

Compression:

Stored size: 629 Bytes

Contents

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fb_graph-0.4.2 lib/fb_graph/connections/albums.rb
fb_graph-0.4.1 lib/fb_graph/connections/albums.rb
fb_graph-0.4.0 lib/fb_graph/connections/albums.rb
fb_graph-0.3.0 lib/fb_graph/connections/albums.rb