Class: Renren2::Interface::Invitations

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

Overview

Invitations 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

生成用户站外邀请用户注册的链接地址,应用可以引导用户通过QQ或者msn等渠道邀请好友加入应用

Parameters:

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

Options Hash (opts):

  • :domain (int)

    获取邀请链接地址的域名属性,0表示人人(wwv.renren.com),1表示开心(wwv.kaixin.com),默认值为人人

See Also:



17
18
19
# File 'lib/renren2/interface/invitations.rb', line 17

def create_link(opts={})
  post 'invitations.createLink', :body => opts
end

#get_info(opts = {}) ⇒ Object

Note:

1.如果想获得某个用户被谁邀请进来的,请传入invitee_id 2.如果想获得一段时间内所有用户的邀请信息,请传入begin_time和end_time,此时请不要传入invitee_id

根据应用新用户的id获取用户是否通过邀请安装,同时得到此次邀请的详细信息(包括邀请者、邀请时间、被邀请者等)

Parameters:

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

Options Hash (opts):

  • :invitee_id (String)

    被邀请者的用户ID

  • :inviter_id (String)

    邀请者的ID

  • :begin_time (String)

    查询起始时间,格式为:yyyy-MM-dd HH:mm:ss

  • :end_time (String)

    查询结束时间,格式为:yyyy-MM-dd HH:mm:ss

  • :page (int)

    分页的页数,默认值为1

  • :count (int)

    分页后每页的数量,默认值为100

See Also:



34
35
36
# File 'lib/renren2/interface/invitations.rb', line 34

def get_info(opts={})
  post 'invitations.getInfo', :body => opts
end