Module: Twitter::API::Trends
Constant Summary
Constant Summary
Constants included from Utils
Instance Method Summary (collapse)
-
- (Array<Twitter::Trend>) trends(id = 1, options = {})
(also: #local_trends, #trends_place)
Returns the top 10 trending topics for a specific WOEID.
-
- (Array<Twitter::Place>) trends_available(options = {})
(also: #trend_locations)
Returns the locations that Twitter has trending topic information for.
-
- (Array<Twitter::Place>) trends_closest(options = {})
Returns the locations that Twitter has trending topic information for, closest to a specified location.
Instance Method Details
- (Array<Twitter::Trend>) trends(id = 1, options = {}) 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 |
- (Array<Twitter::Place>) trends_available(options = {}) 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 |
- (Array<Twitter::Place>) trends_closest(options = {})
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 |