Module: FbGraph::Connections::Milestones

Included in:
Page
Defined in:
lib/fb_graph/connections/milestones.rb

Instance Method Summary collapse

Instance Method Details

#milestone!(options = {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/fb_graph/connections/milestones.rb', line 13

def milestone!(options = {})
  milestone = post options.merge(:connection => :milestones)
  Milestone.new milestone[:id], options.merge(milestone).merge(
    :access_token => options[:access_token] || self.access_token
  )
end

#milestones(options = {}) ⇒ Object



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

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