Module: GSGraph::Connections::UserLikes

Included in:
User
Defined in:
lib/gs_graph/connections/user_likes.rb

Instance Method Summary collapse

Instance Method Details

#like?(page, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/gs_graph/connections/user_likes.rb', line 13

def like?(page, options = {})
  like = self.connection :likes, options.merge(:connection_scope => page.identifier)
  like.present?
end

#likes(options = {}) ⇒ Object



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

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