Sha256: 4b42a3f62fdfda6156a7e021b51780dfd3a119760244a19b957ac9c251a2aef1

Contents?: true

Size: 654 Bytes

Versions: 6

Compression:

Stored size: 654 Bytes

Contents

module FbGraph2
  class Edge
    module AppRequests
      def app_requests(params = {})
        requests = self.edge :apprequests, params
        requests.collect do |request|
          Request.new(request[:id], request).authenticate self.access_token
        end
      end
      alias_method :apprequests, :app_requests

      def app_request!(params = {})
        response = self.post params, edge: :apprequests
        if request = response[:request]
          response[:request] = Request.new(request[:id], request).authenticate self.access_token
        end
        response
      end
      alias_method :apprequest!, :app_request!
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fb_graph2-0.1.0 lib/fb_graph2/edge/app_requests.rb
fb_graph2-0.0.11 lib/fb_graph2/edge/app_requests.rb
fb_graph2-0.0.10 lib/fb_graph2/edge/app_requests.rb
fb_graph2-0.0.9 lib/fb_graph2/edge/app_requests.rb
fb_graph2-0.0.8 lib/fb_graph2/edge/app_requests.rb
fb_graph2-0.0.7 lib/fb_graph2/edge/app_requests.rb