Module: FbGraph2::Edge::AppRequests

Included in:
User
Defined in:
lib/fb_graph2/edge/app_requests.rb

Instance Method Summary collapse

Instance Method Details

#app_request!(params = {}) ⇒ Object Also known as: apprequest!



12
13
14
15
16
17
18
# File 'lib/fb_graph2/edge/app_requests.rb', line 12

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

#app_requests(params = {}) ⇒ Object Also known as: apprequests



4
5
6
7
8
9
# File 'lib/fb_graph2/edge/app_requests.rb', line 4

def app_requests(params = {})
  requests = self.edge :apprequests, params
  requests.collect! do |request|
    Request.new(request[:id], request).authenticate self.access_token
  end
end