Class: Twitter::Trends

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/twitter/trends.rb

Class Method Summary collapse

Class Method Details

.api_endpointObject



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(options={})
  get("/current.json", :query => options)
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(options={})
  get("/daily.json", :query => options)
end

.for_location(woeid, options = {}) ⇒ Object



38
39
40
41
# File 'lib/twitter/trends.rb', line 38

def self.for_location(woeid,options={})
  #checking for api_endpoint in local_trends 
  LocalTrends.for_location(woeid,options)
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(options={})
  get("/weekly.json", :query => options)
end