Class: Weibo2::Interface::Friendships
- Defined in:
- lib/weibo2/interface/friendships.rb
Overview
Friendships API
Instance Method Summary collapse
-
#create(opts = {}) ⇒ Object
no test below 关注一个用户.
-
#create_batch(uids) ⇒ Object
根据用户UID批量关注用户 [Privilege].
-
#destroy(opts = {}) ⇒ Object
取消关注一个用户.
-
#followers(opts = {}) ⇒ Object
获取用户的粉丝列表.
-
#followers_active(uid, opts = {}) ⇒ Object
获取用户的活跃粉丝列表.
-
#followers_ids(opts = {}) ⇒ Object
获取用户粉丝的用户UID列表.
-
#friends(opts = {}) ⇒ Object
获取用户的关注列表.
-
#friends_bilateral(uid, opts = {}) ⇒ Object
获取用户的双向关注列表,即互粉列表.
-
#friends_bilateral_ids(uid, opts = {}) ⇒ Object
获取用户双向关注的用户ID列表,即互粉UID列表.
-
#friends_chain_followers(uid, opts = {}) ⇒ Object
获取当前登录用户的关注人中又关注了指定用户的用户列表.
-
#friends_ids(opts = {}) ⇒ Object
获取用户关注的用户UID列表.
-
#friends_in_common(uid, opts = {}) ⇒ Object
获取两个用户之间的共同关注人列表.
-
#friends_remark_batch(uids) ⇒ Object
批量获取当前登录用户的关注人的备注信息 [Privilege].
-
#remark_update(uid, remark) ⇒ Object
更新当前登录用户所关注的某个好友的备注信息 [Privilege].
-
#show(opts = {}) ⇒ Object
获取两个用户之间的详细关注关系情况.
Methods inherited from Base
#get, #initialize, #post, #request
Constructor Details
This class inherits a constructor from Weibo2::Interface::Base
Instance Method Details
#create(opts = {}) ⇒ Object
no test below 关注一个用户
157 158 159 |
# File 'lib/weibo2/interface/friendships.rb', line 157 def create(opts={}) post 'friendships/create.json', :body => opts end |
#create_batch(uids) ⇒ Object
根据用户UID批量关注用户 [Privilege]
166 167 168 |
# File 'lib/weibo2/interface/friendships.rb', line 166 def create_batch(uids) post 'friendships/create_batch.json', :body => {:uids => uids} end |
#destroy(opts = {}) ⇒ Object
取消关注一个用户
177 178 179 |
# File 'lib/weibo2/interface/friendships.rb', line 177 def destroy(opts={}) post 'friendships/destroy.json', :body => opts end |
#followers(opts = {}) ⇒ Object
获取用户的粉丝列表
93 94 95 |
# File 'lib/weibo2/interface/friendships.rb', line 93 def followers(opts={}) get 'friendships/followers.json', :params => opts end |
#followers_active(uid, opts = {}) ⇒ Object
获取用户的活跃粉丝列表
116 117 118 |
# File 'lib/weibo2/interface/friendships.rb', line 116 def followers_active(uid, opts={}) get 'friendships/followers/active.json', :params => {:uid => uid}.merge(opts) end |
#followers_ids(opts = {}) ⇒ Object
获取用户粉丝的用户UID列表
106 107 108 |
# File 'lib/weibo2/interface/friendships.rb', line 106 def followers_ids(opts={}) get 'friendships/followers/ids.json', :params => opts end |
#friends(opts = {}) ⇒ Object
获取用户的关注列表
19 20 21 |
# File 'lib/weibo2/interface/friendships.rb', line 19 def friends(opts={}) get 'friendships/friends.json', :params => opts end |
#friends_bilateral(uid, opts = {}) ⇒ Object
获取用户的双向关注列表,即互粉列表
45 46 47 |
# File 'lib/weibo2/interface/friendships.rb', line 45 def friends_bilateral(uid, opts={}) get 'friendships/friends/bilateral.json', :params => {:uid => uid}.merge(opts) end |
#friends_bilateral_ids(uid, opts = {}) ⇒ Object
获取用户双向关注的用户ID列表,即互粉UID列表
58 59 60 |
# File 'lib/weibo2/interface/friendships.rb', line 58 def friends_bilateral_ids(uid, opts={}) get 'friendships/friends/bilateral/ids.json', :params => {:uid => uid}.merge(opts) end |
#friends_chain_followers(uid, opts = {}) ⇒ Object
获取当前登录用户的关注人中又关注了指定用户的用户列表
128 129 130 |
# File 'lib/weibo2/interface/friendships.rb', line 128 def friends_chain_followers(uid, opts={}) get 'friendships/friends_chain/followers.json', :params => {:uid => uid}.merge(opts) end |
#friends_ids(opts = {}) ⇒ Object
获取用户关注的用户UID列表
71 72 73 |
# File 'lib/weibo2/interface/friendships.rb', line 71 def friends_ids(opts={}) get 'friendships/friends/ids.json', :params => opts end |
#friends_in_common(uid, opts = {}) ⇒ Object
获取两个用户之间的共同关注人列表
32 33 34 |
# File 'lib/weibo2/interface/friendships.rb', line 32 def friends_in_common(uid, opts={}) get 'friendships/friends/in_common.json', :params => {:uid => uid}.merge(opts) end |
#friends_remark_batch(uids) ⇒ Object
批量获取当前登录用户的关注人的备注信息 [Privilege]
80 81 82 |
# File 'lib/weibo2/interface/friendships.rb', line 80 def friends_remark_batch(uids) get 'friendships/friends/remark_batch.json', :params => {:uids => uids} end |
#remark_update(uid, remark) ⇒ Object
更新当前登录用户所关注的某个好友的备注信息 [Privilege]
187 188 189 |
# File 'lib/weibo2/interface/friendships.rb', line 187 def remark_update(uid, remark) post 'friendships/remark/update.json', :body => {:uid => uid, :remark => remark} end |
#show(opts = {}) ⇒ Object
获取两个用户之间的详细关注关系情况
141 142 143 |
# File 'lib/weibo2/interface/friendships.rb', line 141 def show(opts={}) get 'friendships/show.json', :params => opts end |