Module: FbGraph2::Edge::TestUsers

Included in:
App
Defined in:
lib/fb_graph2/edge/test_users.rb

Instance Method Summary collapse

Instance Method Details

#test_user!(params = {}) ⇒ Object



11
12
13
14
15
# File 'lib/fb_graph2/edge/test_users.rb', line 11

def test_user!(params = {})
  user = self.post params, edge: :accounts, edge_scope: :'test-users'
  params.delete(:access_token) # so as not to keep app token
  TestUser.new(user[:id], user.merge(params))
end

#test_users(params = {}) ⇒ Object



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

def test_users(params = {})
  users = self.edge :accounts, params, edge_scope: :'test-users'
  users.collect! do |user|
    TestUser.new(user[:id], user)
  end
end