Class: Weibo2::Interface::Tags
- Defined in:
- lib/weibo2/interface/tags.rb
Overview
Tags API
Instance Method Summary collapse
-
#create(tags) ⇒ Object
为当前登录用户添加新的用户标签.
-
#destroy(tag_id) ⇒ Object
删除一个用户标签.
-
#destroy_batch(ids) ⇒ Object
批量删除一组标签.
-
#suggestions(opts = {}) ⇒ Object
获取系统推荐的标签列表.
-
#tags(uid, opts = {}) ⇒ Object
返回指定用户的标签列表.
-
#tags_batch(uids) ⇒ Object
批量获取用户的标签列表.
Methods inherited from Base
#get, #initialize, #post, #request
Constructor Details
This class inherits a constructor from Weibo2::Interface::Base
Instance Method Details
#create(tags) ⇒ Object
为当前登录用户添加新的用户标签
49 50 51 |
# File 'lib/weibo2/interface/tags.rb', line 49 def create() post 'tags/create.json', :body => {:tags => } end |
#destroy(tag_id) ⇒ Object
删除一个用户标签
58 59 60 |
# File 'lib/weibo2/interface/tags.rb', line 58 def destroy(tag_id) post 'tags/destroy.json', :body => {:tag_id => tag_id} end |
#destroy_batch(ids) ⇒ Object
批量删除一组标签
66 67 68 |
# File 'lib/weibo2/interface/tags.rb', line 66 def destroy_batch(ids) post 'tags/destroy_batch.json', :body => {:ids => ids} end |
#suggestions(opts = {}) ⇒ Object
获取系统推荐的标签列表
36 37 38 |
# File 'lib/weibo2/interface/tags.rb', line 36 def suggestions(opts={}) get 'tags/suggestions.json', :params => opts end |
#tags(uid, opts = {}) ⇒ Object
返回指定用户的标签列表
17 18 19 |
# File 'lib/weibo2/interface/tags.rb', line 17 def (uid, opts={}) get 'tags.json', :params => {:uid => uid}.merge(opts) end |
#tags_batch(uids) ⇒ Object
批量获取用户的标签列表
26 27 28 |
# File 'lib/weibo2/interface/tags.rb', line 26 def (uids) get 'tags/tags_batch.json', :params => {:uids => uids} end |