lib/chatterbot/search.rb in chatterbot-0.2.1 vs lib/chatterbot/search.rb in chatterbot-0.2.2
- old
+ new
@@ -3,11 +3,11 @@
#
# handle Twitter searches
module Search
# internal search code
- def search(queries, &block)
+ def search(queries, opts = {}, &block)
return unless init_client
debug "check for tweets since #{since_id}"
if queries.is_a?(String)
@@ -16,10 +16,10 @@
#
# search twitter
#
queries.each { |query|
- search = client.search(query, default_opts)
+ search = client.search(query, opts.merge(default_opts))
update_since_id(search)
if search != nil
search["results"].each { |s|
s.symbolize_keys!