Sha256: 12f419cddae26da78ee557d6dd1d550cd34660accaf4f72e145149d95aed2ef2

Contents?: true

Size: 629 Bytes

Versions: 4

Compression:

Stored size: 629 Bytes

Contents

module FbGraph
  module Connections
    module Photos
      def photos(options = {})
        photos = FbGraph::Collection.new(get(options.merge(:connection => 'photos')))
        photos.map! do |photo|
          Photo.new(photo.delete(:id), photo.merge(
            :access_token => options[:access_token] || self.access_token
          ))
        end
      end

      def photo!(options = {})
        photo = post(options.merge(:connection => 'photos'))
        Photo.new(photo.delete(:id), options.merge(photo).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/photos.rb
fb_graph-0.4.1 lib/fb_graph/connections/photos.rb
fb_graph-0.4.0 lib/fb_graph/connections/photos.rb
fb_graph-0.3.0 lib/fb_graph/connections/photos.rb