Class: FBGraph::Search

Inherits:
Base
  • Object
show all
Defined in:
lib/fbgraph/search.rb

Instance Attribute Summary

Attributes inherited from Base

#connection_type, #last_result, #logger, #objects

Instance Method Summary collapse

Methods inherited from Base

#connection, #debug=, #delete!, #find, #info!, #param, #params, #params=, #publish!, #with_fields

Constructor Details

#initialize(client) ⇒ Search

Returns a new instance of Search



4
5
6
7
# File 'lib/fbgraph/search.rb', line 4

def initialize(client)
  @objects = 'search'
  super(client)
end

Instance Method Details

#on(type) ⇒ Object



14
15
16
17
# File 'lib/fbgraph/search.rb', line 14

def on(type)
  @params.merge!({:type => type})
  return self
end

#query(q) ⇒ Object



9
10
11
12
# File 'lib/fbgraph/search.rb', line 9

def query(q)
  @params = {:q => q}
  return self
end