Module: Twitter::API::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 10 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.
Instance Method Details
#trends(id = 1, options = {}) ⇒ Array<Twitter::Trend> Also known as: local_trends, trends_place
Returns the top 10 trending topics for a specific WOEID
22 23 24 25 26 |
# File 'lib/twitter/api/trends.rb', line 22 def trends(id=1, ={}) [:id] = id response = get("/1.1/trends/place.json", ) objects_from_array(Twitter::Trend, response[:body].first[:trends]) end |
#trends_available(options = {}) ⇒ Array<Twitter::Place> Also known as: trend_locations
Returns the locations that Twitter has trending topic information for
40 41 42 |
# File 'lib/twitter/api/trends.rb', line 40 def trends_available(={}) objects_from_response(Twitter::Place, :get, "/1.1/trends/available.json", ) end |
#trends_closest(options = {}) ⇒ Array<Twitter::Place>
Returns the locations that Twitter has trending topic information for, closest to a specified location.
57 58 59 |
# File 'lib/twitter/api/trends.rb', line 57 def trends_closest(={}) objects_from_response(Twitter::Place, :get, "/1.1/trends/closest.json", ) end |