Sha256: 81e5e29f77a8181338f7d8f6d2d9f828d24d748084c60c449d4e96d54806fe21

Contents?: true

Size: 689 Bytes

Versions: 8

Compression:

Stored size: 689 Bytes

Contents

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

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

      def block!(user, params = {})
        self.post params.merge(
          user: Util.as_identifier(user)
        ), edge: :blocked
      end

      def unblock!(user, params = {})
        self.delete params.merge(
          user: Util.as_identifier(user)
        ), edge: :blocked
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fb_graph2-0.1.0 lib/fb_graph2/edge/blocked.rb
fb_graph2-0.0.11 lib/fb_graph2/edge/blocked.rb
fb_graph2-0.0.10 lib/fb_graph2/edge/blocked.rb
fb_graph2-0.0.9 lib/fb_graph2/edge/blocked.rb
fb_graph2-0.0.8 lib/fb_graph2/edge/blocked.rb
fb_graph2-0.0.7 lib/fb_graph2/edge/blocked.rb
fb_graph2-0.0.6 lib/fb_graph2/edge/blocked.rb
fb_graph2-0.0.5 lib/fb_graph2/edge/blocked.rb