Module: FbGraph2::Edge::Scores

Included in:
App, User
Defined in:
lib/fb_graph2/edge/scores.rb

Instance Method Summary collapse

Instance Method Details

#score!(score, params = {}) ⇒ Object



11
12
13
# File 'lib/fb_graph2/edge/scores.rb', line 11

def score!(score, params = {})
  self.post params.merge(score: score), edge: :scores
end

#scores(params = {}) ⇒ Object



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

def scores(params = {})
  scores = self.edge :scores, params
  scores.collect! do |score|
    Struct::Score.new score
  end
end

#unscore!(params = {}) ⇒ Object



15
16
17
# File 'lib/fb_graph2/edge/scores.rb', line 15

def unscore!(params = {})
  self.delete params, edge: :scores
end