Module: FbGraph2::Edge::Offers

Included in:
Page
Defined in:
lib/fb_graph2/edge/offers.rb

Instance Method Summary collapse

Instance Method Details

#offer!(params = {}) ⇒ Object



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

def offer!(params = {})
  offer = self.post params, edge: :offers
  Offer.new(offer[:id], params.merge(offer)).authenticate self.access_token
end

#offers(params = {}) ⇒ Object



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

def offers(params = {})
  offers = self.edge :offers, params
  offers.collect! do |offer|
    Offer.new(offer[:id], offer).authenticate self.access_token
  end
end