Module: Twitter::REST::Trends
Overview
Methods for accessing trending topics
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 locations with trending topic information.
-
#trends_closest(options = {}) ⇒ Array<Twitter::Place>
Returns trend locations 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
25 26 27 28 29 30 |
# File 'lib/twitter/rest/trends.rb', line 25 def trends(id = 1, = {}) = .dup [:id] = id response, = perform_get("/1.1/trends/place.json", ) TrendResults.new(response) end |
#trends_available(options = {}) ⇒ Array<Twitter::Place> Also known as: trend_locations
Returns locations with trending topic information
51 52 53 |
# File 'lib/twitter/rest/trends.rb', line 51 def trends_available( = {}) perform_get_with_objects("/1.1/trends/available.json", , Place) end |
#trends_closest(options = {}) ⇒ Array<Twitter::Place>
Returns trend locations closest to a specified location
72 73 74 |
# File 'lib/twitter/rest/trends.rb', line 72 def trends_closest( = {}) perform_get_with_objects("/1.1/trends/closest.json", , Place) end |