Module: FbGraph::Connections::Notes

Included in:
Application, Page, TestUser, User
Defined in:
lib/fb_graph/connections/notes.rb

Instance Method Summary collapse

Instance Method Details

#note!(options = {}) ⇒ Object



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

def note!(options = {})
  note = post(options.merge(:connection => :notes))
  Note.new(note.delete(:id), options.merge(note).merge(
    :access_token => options[:access_token] || self.access_token
  ))
end

#notes(options = {}) ⇒ Object



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

def notes(options = {})
  notes = self.connection(:notes, options)
  notes.map! do |note|
    Note.new(note.delete(:id), note.merge(
      :access_token => options[:access_token] || self.access_token
    ))
  end
end