Module: Twitter::REST::Trends
Constant Summary
Constants included from Utils
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 26 |
# File 'lib/twitter/rest/trends.rb', line 21 def trends(id = 1, = {}) = .dup [: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
38 39 40 |
# File 'lib/twitter/rest/trends.rb', line 38 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.
53 54 55 |
# File 'lib/twitter/rest/trends.rb', line 53 def trends_closest( = {}) perform_get_with_objects("/1.1/trends/closest.json", , Twitter::Place) end |