Class: Weibo::Api::V2::Trends

Inherits:
Base
  • Object
show all
Defined in:
lib/weibo_focus/api/v2/trends.rb

Instance Method Summary collapse

Methods inherited from Base

#hashie, #initialize

Constructor Details

This class inherits a constructor from Weibo::Api::V2::Base

Instance Method Details

#daily(opt = {}) ⇒ Object



19
20
21
# File 'lib/weibo_focus/api/v2/trends.rb', line 19

def daily(opt={})
  hashie get("trends/daily.json", :params => opt)
end

#destroy(trend_id, opt = {}) ⇒ Object



32
33
34
# File 'lib/weibo_focus/api/v2/trends.rb', line 32

def destroy(trend_id, opt={})
  hashie post("trends/destroy.json", :params => {:trend_id => trend_id}.merge(opt))
end

#follow(trend_name, opt = {}) ⇒ Object

write interfaces



28
29
30
# File 'lib/weibo_focus/api/v2/trends.rb', line 28

def follow(trend_name, opt={})
  hashie post("trends/follow.json", :params => {:trend_name => trend_name}.merge(opt))
end

#hourly(opt = {}) ⇒ Object



15
16
17
# File 'lib/weibo_focus/api/v2/trends.rb', line 15

def hourly(opt={})
  hashie get("trends/hourly.json", :params => opt)
end

#is_follow(trend_name, opt = {}) ⇒ Object



11
12
13
# File 'lib/weibo_focus/api/v2/trends.rb', line 11

def is_follow(trend_name, opt={})
  hashie get("trends/is_follow.json", :params => {:trend_name => CGI::escape(trend_name)}.merge(opt))
end

read interfaces



7
8
9
# File 'lib/weibo_focus/api/v2/trends.rb', line 7

def trends(uid, opt={})
  hashie get("trends.json", :params => {:uid => uid}.merge(opt))
end

#weekly(opt = {}) ⇒ Object



23
24
25
# File 'lib/weibo_focus/api/v2/trends.rb', line 23

def weekly(opt={})
  hashie get("trends/weekly.json", :params => opt)
end