Module: FbGraph::Connections::Scores

Included in:
User
Defined in:
lib/fb_graph/connections/scores.rb

Instance Method Summary collapse

Instance Method Details

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



13
14
15
# File 'lib/fb_graph/connections/scores.rb', line 13

def score!(score, options = {})
  post options.merge(:connection => :scores, :score => score)
end

#scores(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/fb_graph/connections/scores.rb', line 4

def scores(options = {})
  scores = self.connection :scores, options
  scores.map! do |score|
    Score.new score[:id], score.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end

#unscore!(options = {}) ⇒ Object



17
18
19
# File 'lib/fb_graph/connections/scores.rb', line 17

def unscore!(options = {})
  destroy options.merge(:connection => :scores)
end