Method: Echo::Search#build_query

Defined in:
lib/echor/search.rb

#build_query(options) ⇒ Object

Raises:

  • (ArgumentError)


14
15
16
17
18
19
20
21
# File 'lib/echor/search.rb', line 14

def build_query(options)
  raise ArgumentError unless options[:q]      
  raise ArgumentError unless Echo.user
  
  options[:appkey] = Echo.user
  
  "/search?#{options.to_query}"
end