Class: Twitter::Trends
- Inherits:
-
Object
- Object
- Twitter::Trends
- Includes:
- HTTParty
- Defined in:
- lib/twitter/trends.rb
Class Method Summary collapse
- .api_endpoint ⇒ Object
- .api_endpoint=(value) ⇒ Object
- .available(query = {}) ⇒ Object
-
.current(options = {}) ⇒ Object
:exclude => ‘hashtags’ to exclude hashtags.
-
.daily(options = {}) ⇒ Object
:exclude => ‘hashtags’ to exclude hashtags :date => yyyy-mm-dd for specific date.
- .for_location(woeid, options = {}) ⇒ Object
-
.weekly(options = {}) ⇒ Object
:exclude => ‘hashtags’ to exclude hashtags :date => yyyy-mm-dd for specific date.
Class Method Details
.api_endpoint ⇒ Object
8 9 10 |
# File 'lib/twitter/trends.rb', line 8 def self.api_endpoint @api_endpoint ||= "search.twitter.com/trends" end |
.api_endpoint=(value) ⇒ Object
12 13 14 |
# File 'lib/twitter/trends.rb', line 12 def self.api_endpoint=(value) @api_endpoint = value end |
.available(query = {}) ⇒ Object
33 34 35 36 |
# File 'lib/twitter/trends.rb', line 33 def self.available(query={}) #checking for api_endpoint in local_trends LocalTrends.available(query) end |
.current(options = {}) ⇒ Object
:exclude => ‘hashtags’ to exclude hashtags
17 18 19 |
# File 'lib/twitter/trends.rb', line 17 def self.current(={}) get("/current.json", :query => ) end |
.daily(options = {}) ⇒ Object
:exclude => ‘hashtags’ to exclude hashtags :date => yyyy-mm-dd for specific date
23 24 25 |
# File 'lib/twitter/trends.rb', line 23 def self.daily(={}) get("/daily.json", :query => ) end |
.for_location(woeid, options = {}) ⇒ Object
38 39 40 41 |
# File 'lib/twitter/trends.rb', line 38 def self.for_location(woeid,={}) #checking for api_endpoint in local_trends LocalTrends.for_location(woeid,) end |
.weekly(options = {}) ⇒ Object
:exclude => ‘hashtags’ to exclude hashtags :date => yyyy-mm-dd for specific date
29 30 31 |
# File 'lib/twitter/trends.rb', line 29 def self.weekly(={}) get("/weekly.json", :query => ) end |