Sha256: 62b5ede7252e4e03f84ce8714b58b56cc68b83a27d58624c9a19e8c9858c8f0b

Contents?: true

Size: 594 Bytes

Versions: 9

Compression:

Stored size: 594 Bytes

Contents

module FbGraph
  module Connections
    module Albums
      def albums(options = {})
        albums = self.connection(:albums, options)
        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

9 entries across 9 versions & 1 rubygems

Version Path
fb_graph-1.0.1 lib/fb_graph/connections/albums.rb
fb_graph-1.0.0 lib/fb_graph/connections/albums.rb
fb_graph-0.8.0 lib/fb_graph/connections/albums.rb
fb_graph-0.7.3 lib/fb_graph/connections/albums.rb
fb_graph-0.7.2 lib/fb_graph/connections/albums.rb
fb_graph-0.7.1 lib/fb_graph/connections/albums.rb
fb_graph-0.7.0 lib/fb_graph/connections/albums.rb
fb_graph-0.6.0 lib/fb_graph/connections/albums.rb
fb_graph-0.5.0 lib/fb_graph/connections/albums.rb