Class: Renren2::Interface::Admin

Inherits:
Base
  • Object
show all
Defined in:
lib/renren2/interface/admin.rb

Overview

Admin Interface

Instance Method Summary collapse

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_allocationObject

得到一个应用当天可以发送的通知和邀请的配额



14
15
16
# File 'lib/renren2/interface/admin.rb', line 14

def get_allocation
  post 'admin.getAllocation'
end

#text_filter(text, opts = {}) ⇒ Object

对给定的文本进行过滤,返回过滤后的文本,如果不合法,则给出错误信息

Parameters:

  • text (String)

    需检查的文本内容

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :type (int)

    过滤的文本类型,1代表纯文本,2代表包含脚本或标签的文本。缺省值为1

See Also:



25
26
27
# File 'lib/renren2/interface/admin.rb', line 25

def text_filter(text, opts={})
  post 'admin.textFilter', :body => {:text => text}.merge(opts)
end