Sha256: 813172b27488ab16d5ddac3f9d65f22e4d68b0511c4c902fb3941da9d2bf3158

Contents?: true

Size: 722 Bytes

Versions: 16

Compression:

Stored size: 722 Bytes

Contents

module FbGraph
  module Connections
    module Achievements
      def achievements(options = {})
        options[:access_token] ||= self.access_token
        achievements = self.connection(:achievements, options)
        achievements.map! do |achievement|
          Achievement.new(achievement[:id], achievement.merge(:access_token => options[:access_token]))
        end
      end

      def achievement!(achievement_url, options = {})
        post options.merge(:connection => :achievements, :achievement => achievement_url)
      end

      def unregister_achievement!(achievement_url, options = {})
        delete options.merge(:connection => :achievements, :achievement => achievement_url)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fb_graph-2.2.6 lib/fb_graph/connections/achievements.rb
fb_graph-2.2.5 lib/fb_graph/connections/achievements.rb
fb_graph-2.2.4 lib/fb_graph/connections/achievements.rb
fb_graph-2.2.3 lib/fb_graph/connections/achievements.rb
fb_graph-2.2.2 lib/fb_graph/connections/achievements.rb
fb_graph-2.2.1 lib/fb_graph/connections/achievements.rb
fb_graph-2.2.0 lib/fb_graph/connections/achievements.rb
fb_graph-2.2.0.beta lib/fb_graph/connections/achievements.rb
fb_graph-2.2.0.alpha2 lib/fb_graph/connections/achievements.rb
fb_graph-2.2.0.alpha lib/fb_graph/connections/achievements.rb
fb_graph-2.1.13 lib/fb_graph/connections/achievements.rb
fb_graph-2.1.12 lib/fb_graph/connections/achievements.rb
fb_graph-2.1.11 lib/fb_graph/connections/achievements.rb
fb_graph-2.1.10 lib/fb_graph/connections/achievements.rb
fb_graph-2.1.9 lib/fb_graph/connections/achievements.rb
fb_graph-2.1.8 lib/fb_graph/connections/achievements.rb