Module: GSGraph::Connections::Links

Included in:
Page, User
Defined in:
lib/gs_graph/connections/links.rb

Instance Method Summary collapse

Instance Method Details

#link!(options = {}) ⇒ Object



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

def link!(options = {})
  link = post options.merge(:connection => :links)
  Link.new link[:id], options.merge(link).merge(
    :access_token => options[:access_token] || self.access_token
  )
end


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

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