Class: Weibo::Api::V2::Friendships

Inherits:
Base
  • Object
show all
Defined in:
lib/weibo_focus/api/v2/friendships.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

#create(opt = {}) ⇒ Object

write interfaces



49
50
51
# File 'lib/weibo_focus/api/v2/friendships.rb', line 49

def create(opt={})
  hashie post("friendships/create.json", :params => opt)
end

#destroy(opt = {}) ⇒ Object



53
54
55
# File 'lib/weibo_focus/api/v2/friendships.rb', line 53

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

#followers(opt = {}) ⇒ Object



27
28
29
# File 'lib/weibo_focus/api/v2/friendships.rb', line 27

def followers(opt={})
   get("friendships/followers.json", :params => opt)
end

#followers_active(uid, opt = {}) ⇒ Object



35
36
37
# File 'lib/weibo_focus/api/v2/friendships.rb', line 35

def followers_active(uid, opt={})
   get("friendships/followers/active.json", :params => {:uid => uid}.merge(opt))
end

#followers_ids(opt = {}) ⇒ Object



31
32
33
# File 'lib/weibo_focus/api/v2/friendships.rb', line 31

def followers_ids(opt={})
   get("friendships/followers/ids.json", :params => opt)
end

#friends(opt = {}) ⇒ Object

read interfaces



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

def friends(opt={})
   get("friendships/friends.json", :params => opt)
end

#friends_bilateral(uid, opt = {}) ⇒ Object



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

def friends_bilateral(uid, opt={})
   get("friendships/friends/bilateral.json", :params => {:uid => uid}.merge(opt))
end

#friends_bilateral_ids(uid, opt = {}) ⇒ Object



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

def friends_bilateral_ids(uid, opt={})
   get("friendships/friends/bilateral/ids.json", :params => {:uid => uid}.merge(opt))
end

#friends_chain_followers(uid, opt = {}) ⇒ Object



39
40
41
# File 'lib/weibo_focus/api/v2/friendships.rb', line 39

def friends_chain_followers(uid, opt={})
   get("friendships/friends_chain/followers.json", :params => {:uid => uid}.merge(opt))
end

#friends_ids(opt = {}) ⇒ Object



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

def friends_ids(opt={})
   get("friendships/friends/ids.json", :params => opt)
end

#friends_in_common(uid, opt = {}) ⇒ Object



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

def friends_in_common(uid, opt={})
   get("friendships/friends/in_common.json", :params => {:uid => uid}.merge(opt))
end

#remark_update(uid, remark, opt = {}) ⇒ Object



57
58
59
# File 'lib/weibo_focus/api/v2/friendships.rb', line 57

def remark_update(uid, remark, opt={})
  hashie post("friendships/remark/update.json", :params => {:uid => uid, :remark => remark}.merge(opt))
end

#show(opt = {}) ⇒ Object



43
44
45
# File 'lib/weibo_focus/api/v2/friendships.rb', line 43

def show(opt={})
   get("friendships/show.json", :params => opt)
end