Module: Twitter::REST::Trends
Constant Summary
Constants included from Utils
Utils::DEFAULT_CURSOR, Utils::URI_SUBSTRING
Instance Method Summary collapse
-
#trends(id = 1, options = {}) ⇒ Array<Twitter::Trend>
(also: #local_trends, #trends_place)
Returns the top 50 trending topics for a specific WOEID.
-
#trends_available(options = {}) ⇒ Array<Twitter::Place>
(also: #trend_locations)
Returns the locations that Twitter has trending topic information for.
-
#trends_closest(options = {}) ⇒ Array<Twitter::Place>
Returns the locations that Twitter has trending topic information for, closest to a specified location.
Methods included from Utils
Instance Method Details
#trends(id = 1, options = {}) ⇒ Array<Twitter::Trend> Also known as: local_trends, trends_place
Returns the top 50 trending topics for a specific WOEID
21 22 23 24 25 |
# File 'lib/twitter/rest/trends.rb', line 21 def trends(id = 1, = {}) [:id] = id response = perform_get('/1.1/trends/place.json', ).first Twitter::TrendResults.new(response) end |
#trends_available(options = {}) ⇒ Array<Twitter::Place> Also known as: trend_locations
Returns the locations that Twitter has trending topic information for
37 38 39 |
# File 'lib/twitter/rest/trends.rb', line 37 def trends_available( = {}) perform_get_with_objects('/1.1/trends/available.json', , Twitter::Place) end |
#trends_closest(options = {}) ⇒ Array<Twitter::Place>
Returns the locations that Twitter has trending topic information for, closest to a specified location.
52 53 54 |
# File 'lib/twitter/rest/trends.rb', line 52 def trends_closest( = {}) perform_get_with_objects('/1.1/trends/closest.json', , Twitter::Place) end |