Module: Twitter::REST::Search
- Included in:
- API
- Defined in:
- lib/twitter/rest/search.rb
Constant Summary collapse
- MAX_TWEETS_PER_REQUEST =
100
Instance Method Summary collapse
-
#search(query, options = {}) ⇒ Twitter::SearchResults
Returns tweets that match a specified query.
Instance Method Details
#search(query, options = {}) ⇒ Twitter::SearchResults
Note:
Please note that Twitter's search service and, by extension, the Search API is not meant to be an exhaustive source of Tweets. Not all Tweets will be indexed or made available via the search interface.
Returns tweets that match a specified query.
30 31 32 33 34 35 |
# File 'lib/twitter/rest/search.rb', line 30 def search(query, = {}) = .dup [:count] ||= MAX_TWEETS_PER_REQUEST request = Twitter::REST::Request.new(self, :get, "/1.1/search/tweets.json", .merge(q: query)) Twitter::SearchResults.new(request) end |