Class: Weibo2::Interface::Trends
- Defined in:
- lib/weibo2/interface/trends.rb
Overview
Trends API
Instance Method Summary collapse
-
#daily(opts = {}) ⇒ Object
返回最近一天内的热门话题.
-
#destroy(trend_id) ⇒ Object
8485304 no pass 取消对某话题的关注.
-
#follow(trend_name) ⇒ Object
关注某话题.
-
#hourly(opts = {}) ⇒ Object
返回最近一小时内的热门话题.
-
#is_follow(trend_name) ⇒ Object
判断当前用户是否关注某话题.
-
#trends(uid, opts = {}) ⇒ Object
获取某人的话题列表.
-
#weekly(opts = {}) ⇒ Object
返回最近一周内的热门话题.
Methods inherited from Base
#get, #initialize, #post, #request
Constructor Details
This class inherits a constructor from Weibo2::Interface::Base
Instance Method Details
#daily(opts = {}) ⇒ Object
返回最近一天内的热门话题
46 47 48 |
# File 'lib/weibo2/interface/trends.rb', line 46 def daily(opts={}) get 'trends/daily.json', :params => opts end |
#destroy(trend_id) ⇒ Object
8485304 no pass 取消对某话题的关注
78 79 80 |
# File 'lib/weibo2/interface/trends.rb', line 78 def destroy(trend_id) post 'trends/destroy.json', :body => {:trend_id => trend_id} end |
#follow(trend_name) ⇒ Object
关注某话题
68 69 70 |
# File 'lib/weibo2/interface/trends.rb', line 68 def follow(trend_name) post 'trends/follow.json', :body => {:trend_name => trend_name} end |
#hourly(opts = {}) ⇒ Object
返回最近一小时内的热门话题
36 37 38 |
# File 'lib/weibo2/interface/trends.rb', line 36 def hourly(opts={}) get 'trends/hourly.json', :params => opts end |
#is_follow(trend_name) ⇒ Object
判断当前用户是否关注某话题
26 27 28 |
# File 'lib/weibo2/interface/trends.rb', line 26 def is_follow(trend_name) get 'trends/is_follow.json', :params => {:trend_name => trend_name} end |
#trends(uid, opts = {}) ⇒ Object
获取某人的话题列表
17 18 19 |
# File 'lib/weibo2/interface/trends.rb', line 17 def trends(uid, opts={}) get 'trends.json', :params => {:uid => uid}.merge(opts) end |
#weekly(opts = {}) ⇒ Object
返回最近一周内的热门话题
56 57 58 |
# File 'lib/weibo2/interface/trends.rb', line 56 def weekly(opts={}) get 'trends/weekly.json', :params => opts end |