Class: Renren2::Interface::Like
- Defined in:
- lib/renren2/interface/like.rb
Overview
Like Interface
Instance Method Summary collapse
-
#get_count(urls) ⇒ Object
获取url被喜欢的次数.
-
#is_liked(uids, urls) ⇒ Object
判断用户是否喜欢过url.
-
#like(url) ⇒ Object
no test below 对某一url执行喜欢操作.
-
#unlike(url) ⇒ Object
对某一url执行取消喜欢操作.
Methods inherited from Base
#check_scope, #get, #initialize, #post, #request
Constructor Details
This class inherits a constructor from Renren2::Interface::Base
Instance Method Details
#get_count(urls) ⇒ Object
获取url被喜欢的次数
25 26 27 |
# File 'lib/renren2/interface/like.rb', line 25 def get_count(urls) post 'like.getCount', :body => {:urls => urls} end |
#is_liked(uids, urls) ⇒ Object
判断用户是否喜欢过url
16 17 18 |
# File 'lib/renren2/interface/like.rb', line 16 def is_liked(uids, urls) post 'like.isLiked', :body => {:uids => uids, :urls => urls} end |
#like(url) ⇒ Object
Note:
require “operate_like” scope
no test below 对某一url执行喜欢操作
36 37 38 39 |
# File 'lib/renren2/interface/like.rb', line 36 def like(url) check_scope "operate_like" post 'like.like', :body => {:url => url} end |
#unlike(url) ⇒ Object
Note:
require “operate_like” scope
对某一url执行取消喜欢操作
47 48 49 50 |
# File 'lib/renren2/interface/like.rb', line 47 def unlike(url) check_scope "operate_like" post 'like.unlike', :body => {:url => url} end |