Sha256: 1b35658fc83cd4b815cf334386d46df9159a3ab8c954a89b95e21ca82f557b4a

Contents?: true

Size: 677 Bytes

Versions: 34

Compression:

Stored size: 677 Bytes

Contents

module FbGraph2
  class Edge
    module Banned
      def banned(params = {})
        users = self.edge :banned, params
        users.collect! do |user|
          User.new(user[:id], user).authenticate self.access_token
        end
      end

      def banned?(user, params = {})
        users = self.edge :banned, params, edge_scope: user
        users.present?
      end

      def ban!(user, params = {})
        self.post params.merge(
          uid: Util.as_identifier(user)
        ), edge: :banned
      end

      def unban!(user, params = {})
        self.delete params.merge(
          uid: Util.as_identifier(user)
        ), edge: :banned
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
fb_graph2-1.3.0 lib/fb_graph2/edge/banned.rb
fb_graph2-1.2.0 lib/fb_graph2/edge/banned.rb
fb_graph2-1.1.1 lib/fb_graph2/edge/banned.rb
fb_graph2-1.1.0 lib/fb_graph2/edge/banned.rb
fb_graph2-1.0.1 lib/fb_graph2/edge/banned.rb
fb_graph2-1.0.0 lib/fb_graph2/edge/banned.rb
fb_graph2-0.9.1 lib/fb_graph2/edge/banned.rb
fb_graph2-0.9.0 lib/fb_graph2/edge/banned.rb
fb_graph2-0.8.0 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.9 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.8 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.7 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.6 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.5 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.4 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.3 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.2 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.1 lib/fb_graph2/edge/banned.rb
fb_graph2-0.7.0 lib/fb_graph2/edge/banned.rb
fb_graph2-0.6.2 lib/fb_graph2/edge/banned.rb