Class: Renren2::Interface::Users
- Defined in:
- lib/renren2/interface/users.rb
Overview
Users API
Instance Method Summary collapse
-
#get_info(opts = {}) ⇒ Object
获取用户的信息.
-
#get_logged_in_user ⇒ Object
得到当前session的用户ID.
-
#get_profile_info(uid, opts = {}) ⇒ Object
获取用户个人主页的信息,包括日志数、好友数、相册数、个人基本资料等.
-
#get_visitors(opts = {}) ⇒ Object
获得当前用户最近来访的列表.
-
#has_app_permission(ext_perm) ⇒ Object
检查用户是否授予应用扩展权限.
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_info(opts = {}) ⇒ Object
获取用户的信息
17 18 19 |
# File 'lib/renren2/interface/users.rb', line 17 def get_info(opts={}) post 'users.getInfo', :body => opts end |
#get_logged_in_user ⇒ Object
得到当前session的用户ID
24 25 26 |
# File 'lib/renren2/interface/users.rb', line 24 def get_logged_in_user post 'users.getLoggedInUser' end |
#get_profile_info(uid, opts = {}) ⇒ Object
获取用户个人主页的信息,包括日志数、好友数、相册数、个人基本资料等
44 45 46 |
# File 'lib/renren2/interface/users.rb', line 44 def get_profile_info(uid, opts={}) post 'users.getProfileInfo', :body => {:uid => uid}.merge(opts) end |
#get_visitors(opts = {}) ⇒ Object
获得当前用户最近来访的列表
55 56 57 |
# File 'lib/renren2/interface/users.rb', line 55 def get_visitors(opts={}) post 'users.getVisitors', :body => opts end |
#has_app_permission(ext_perm) ⇒ Object
检查用户是否授予应用扩展权限
33 34 35 |
# File 'lib/renren2/interface/users.rb', line 33 def (ext_perm) post 'users.hasAppPermission', :body => {:ext_perm => ext_perm} end |