Class: Renren2::Interface::Feed
- Defined in:
- lib/renren2/interface/feed.rb
Overview
Feed Interface
Instance Method Summary collapse
-
#get(type, opts = {}) ⇒ Object
获取当前用户的新鲜事内容.
-
#publish_feed(name, description, url, opts = {}) ⇒ Object
以当前会话的用户(session_key对应用户)身份发送应用的自定义新鲜事.
Methods inherited from Base
#check_scope, #initialize, #post, #request
Constructor Details
This class inherits a constructor from Renren2::Interface::Base
Instance Method Details
#get(type, opts = {}) ⇒ Object
Note:
require “read_user_feed” scope
获取当前用户的新鲜事内容
21 22 23 24 |
# File 'lib/renren2/interface/feed.rb', line 21 def get(type, opts={}) check_scope "read_user_feed" post 'feed.get', :body => {:type => type}.merge(opts) end |
#publish_feed(name, description, url, opts = {}) ⇒ Object
Note:
require “publish_feed” scope
以当前会话的用户(session_key对应用户)身份发送应用的自定义新鲜事
39 40 41 42 |
# File 'lib/renren2/interface/feed.rb', line 39 def publish_feed(name, description, url, opts={}) check_scope "publish_feed" post 'feed.publishFeed', :body => {:name => name, :description => description, :url => url}.merge(opts) end |