Class: Renren2::Interface::Status
- Defined in:
- lib/renren2/interface/status.rb
Overview
Status API
Instance Method Summary collapse
-
#add_comment(owner_id, content, status_id, opts = {}) ⇒ Object
no test 对一条状态增加一条回复.
-
#forward(status, forward_id, forward_owner) ⇒ Object
用户转发状态的操作,支持同时评论给转发人.
-
#get(status_id, opts = {}) ⇒ Object
返回用户某条状态,不包含回复内容.
-
#get_comment(status_id, owner_id, opts = {}) ⇒ Object
获取一条状态中的所有最新回复内容.
-
#get_emoticons(opts = {}) ⇒ Object
获取状态中的表情图片和表情符号对应列表.
-
#gets(opts = {}) ⇒ Object
返回指定用户的状态列表,不包含回复内容。如果不指定用户,则获取当前用户的状态信息.
-
#set(status, opts = {}) ⇒ Object
用户更新状态.
Methods inherited from Base
#check_scope, #initialize, #post, #request
Constructor Details
This class inherits a constructor from Renren2::Interface::Base
Instance Method Details
#add_comment(owner_id, content, status_id, opts = {}) ⇒ Object
Note:
require “read_user_status,publish_comment” scope
no test 对一条状态增加一条回复
76 77 78 79 80 |
# File 'lib/renren2/interface/status.rb', line 76 def add_comment(owner_id, content, status_id, opts={}) check_scope "read_user_status" check_scope "publish_comment" post 'status.addComment', :body => {:owner_id => owner_id, :content => content, :status_id => status_id}.merge(opts) end |
#forward(status, forward_id, forward_owner) ⇒ Object
Note:
require “status_update” scope
用户转发状态的操作,支持同时评论给转发人
100 101 102 103 |
# File 'lib/renren2/interface/status.rb', line 100 def forward(status, forward_id, forward_owner) check_scope "status_update" post 'status.forward', :body => {:status => status, :forward_id => forward_id, :forward_owner => forward_owner} end |
#get(status_id, opts = {}) ⇒ Object
Note:
require “read_user_status” scope
返回用户某条状态,不包含回复内容
44 45 46 47 |
# File 'lib/renren2/interface/status.rb', line 44 def get(status_id, opts={}) check_scope "read_user_status" post 'status.get', :body => {:status_id => status_id}.merge(opts) end |
#get_comment(status_id, owner_id, opts = {}) ⇒ Object
Note:
require “read_user_status” scope
获取一条状态中的所有最新回复内容
60 61 62 63 |
# File 'lib/renren2/interface/status.rb', line 60 def get_comment(status_id, owner_id, opts={}) check_scope "read_user_status" post 'status.getComment', :body => {:status_id => status_id, :owner_id => owner_id}.merge(opts) end |
#get_emoticons(opts = {}) ⇒ Object
获取状态中的表情图片和表情符号对应列表
88 89 90 |
# File 'lib/renren2/interface/status.rb', line 88 def get_emoticons(opts={}) post 'status.getEmoticons', :body => opts end |
#gets(opts = {}) ⇒ Object
Note:
require “read_user_status” scope
返回指定用户的状态列表,不包含回复内容。如果不指定用户,则获取当前用户的状态信息
18 19 20 21 |
# File 'lib/renren2/interface/status.rb', line 18 def gets(opts={}) check_scope "read_user_status" post 'status.gets', :body => opts end |
#set(status, opts = {}) ⇒ Object
Note:
require “status_update” scope
用户更新状态
31 32 33 34 |
# File 'lib/renren2/interface/status.rb', line 31 def set(status, opts={}) check_scope "status_update" post 'status.set', :body => {:status => status}.merge(opts) end |