Class: Weibo2::Interface::Users

Inherits:
Base
  • Object
show all
Defined in:
lib/weibo2/interface/users.rb

Overview

Users API

Instance Method Summary collapse

Methods inherited from Base

#get, #initialize, #post, #request

Constructor Details

This class inherits a constructor from Weibo2::Interface::Base

Instance Method Details

#domain_show(domain) ⇒ Object

通过个性化域名获取用户资料以及用户最新的一条微博

Parameters:

  • domain (String)

    需要查询的个性化域名

See Also:



26
27
28
# File 'lib/weibo2/interface/users.rb', line 26

def domain_show(domain)
  get "users/domain_show.json", :params => {:domain => domain}
end

#show(opts = {}) ⇒ Object

根据用户ID获取用户信息

Parameters:

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

Options Hash (opts):

  • :uid (String)

    需要查询的用户ID

  • :screen_name (String)

    需要查询的用户昵称

See Also:



17
18
19
# File 'lib/weibo2/interface/users.rb', line 17

def show(opts={})
  get "users/show.json", :params => opts
end

#show_batch(opts = {}) ⇒ Object

批量获取用户的基本信息 [Privilege]

Parameters:

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

Options Hash (opts):

  • :uids (String)

    需要查询的用户ID,用半角逗号分隔,一次最多20个

  • :screen_name (String)

    需要查询的用户昵称,用半角逗号分隔,一次最多20个

See Also:



37
38
39
# File 'lib/weibo2/interface/users.rb', line 37

def show_batch(opts={})
  get "users/show_batch.json", :params => opts
end