Module: RedditKit::Client::Search
- Included in:
- RedditKit::Client
- Defined in:
- lib/redditkit/client/search.rb
Overview
Methods for searching reddit’s links.
Instance Method Summary collapse
-
#search(query, options = {}) ⇒ RedditKit::PaginatedResponse
Search for links.
Instance Method Details
#search(query, options = {}) ⇒ RedditKit::PaginatedResponse
Search for links.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/redditkit/client/search.rb', line 20 def search(query, = {}) path = "%s/search.json" % ('r/' + [:subreddit] if [:subreddit]) parameters = { :q => query, :restrict_sr => [:restrict_to_subreddit], :limit => [:limit], :count => [:count], :sort => [:sort], :before => [:before], :after => [:after], :syntax => [:syntax], :t => [:time] } objects_from_response(:get, path, parameters) end |