Class: Weibo2::Interface::Account
- Defined in:
- lib/weibo2/interface/account.rb
Overview
Account API
Instance Method Summary collapse
-
#avatar_upload(image) ⇒ Object
no test 更新当前登录用户的头像 [Privilege].
-
#get_privacy ⇒ Object
获取当前登录用户的隐私设置.
-
#get_uid ⇒ Object
OAuth授权之后,获取授权用户的UID.
-
#profile_basic(opts = {}) ⇒ Object
获取用户基本信息 [Privilege].
-
#profile_basic_update(screen_name, province, city, gender, opts = {}) ⇒ Object
更新用户的基本信息 [Privilege].
-
#profile_car_destroy(id) ⇒ Object
根据公司ID删除用户的职业信息 [Privilege].
-
#profile_car_update(opts) ⇒ Object
更新当前登录用户的职业信息 [Privilege].
-
#profile_career(opts = {}) ⇒ Object
获取用户的职业信息 [Privilege].
-
#profile_career_batch(uids) ⇒ Object
批量获取用户的职业信息 [Privilege].
-
#profile_edu_destroy(id) ⇒ Object
根据学校ID删除用户的教育信息 [Privilege].
-
#profile_edu_update(type, school_id, opts = {}) ⇒ Object
更新当前登录用户的教育信息 [Privilege].
-
#profile_education(opts = {}) ⇒ Object
获取用户的教育信息 [Privilege].
-
#profile_education_batch(uids) ⇒ Object
批量获取用户的教育信息 [Privilege].
-
#profile_school_list(opts = {}) ⇒ Object
获取所有的学校列表.
-
#rate_limit_status ⇒ Object
获取当前登录用户的API访问频率限制情况.
-
#update_privacy(opts = {}) ⇒ Object
更新当前登录用户的隐私设置 [Privilege].
Methods inherited from Base
#get, #initialize, #post, #request
Constructor Details
This class inherits a constructor from Weibo2::Interface::Base
Instance Method Details
#avatar_upload(image) ⇒ Object
no test 更新当前登录用户的头像 [Privilege]
185 186 187 |
# File 'lib/weibo2/interface/account.rb', line 185 def avatar_upload(image) post 'account/avatar/upload.json', :body => {:image => image} end |
#get_privacy ⇒ Object
获取当前登录用户的隐私设置
61 62 63 |
# File 'lib/weibo2/interface/account.rb', line 61 def get_privacy get 'account/get_privacy.json' end |
#get_uid ⇒ Object
OAuth授权之后,获取授权用户的UID
91 92 93 |
# File 'lib/weibo2/interface/account.rb', line 91 def get_uid get 'account/get_uid.json' end |
#profile_basic(opts = {}) ⇒ Object
获取用户基本信息 [Privilege]
16 17 18 |
# File 'lib/weibo2/interface/account.rb', line 16 def profile_basic(opts={}) get 'account/profile/basic.json', :params => opts end |
#profile_basic_update(screen_name, province, city, gender, opts = {}) ⇒ Object
更新用户的基本信息 [Privilege]
124 125 126 127 |
# File 'lib/weibo2/interface/account.rb', line 124 def profile_basic_update(screen_name, province, city, gender, opts={}) body = {:screen_name => screen_name, :province => province, :city => city, :gender => gender}.merge(opts) post 'account/profile/basic_update.json', :body => body end |
#profile_car_destroy(id) ⇒ Object
根据公司ID删除用户的职业信息 [Privilege]
175 176 177 |
# File 'lib/weibo2/interface/account.rb', line 175 def profile_car_destroy(id) post 'account/profile/car_destroy.json', :body => {:id => id} end |
#profile_car_update(opts) ⇒ Object
更新当前登录用户的职业信息 [Privilege]
166 167 168 |
# File 'lib/weibo2/interface/account.rb', line 166 def profile_car_update(opts) post 'account/profile/car_update.json', :body => opts end |
#profile_career(opts = {}) ⇒ Object
获取用户的职业信息 [Privilege]
45 46 47 |
# File 'lib/weibo2/interface/account.rb', line 45 def profile_career(opts={}) get 'account/profile/career.json', :params => opts end |
#profile_career_batch(uids) ⇒ Object
批量获取用户的职业信息 [Privilege]
54 55 56 |
# File 'lib/weibo2/interface/account.rb', line 54 def profile_career_batch(uids) get 'account/profile/career_batch.json', :params => uids end |
#profile_edu_destroy(id) ⇒ Object
根据学校ID删除用户的教育信息 [Privilege]
149 150 151 |
# File 'lib/weibo2/interface/account.rb', line 149 def profile_edu_destroy(id) post 'account/profile/edu_destroy.json', :body => {:id => id} end |
#profile_edu_update(type, school_id, opts = {}) ⇒ Object
更新当前登录用户的教育信息 [Privilege]
140 141 142 |
# File 'lib/weibo2/interface/account.rb', line 140 def profile_edu_update(type, school_id, opts={}) post 'account/profile/edu_update.json', :body => {:type => type, :school_id => school_id}.merge(opts) end |
#profile_education(opts = {}) ⇒ Object
获取用户的教育信息 [Privilege]
26 27 28 |
# File 'lib/weibo2/interface/account.rb', line 26 def profile_education(opts={}) get 'account/profile/education.json', :params => opts end |
#profile_education_batch(uids) ⇒ Object
批量获取用户的教育信息 [Privilege]
35 36 37 |
# File 'lib/weibo2/interface/account.rb', line 35 def profile_education_batch(uids) get 'account/profile/education_batch.json', :params => {:uids => uids} end |
#profile_school_list(opts = {}) ⇒ Object
获取所有的学校列表
77 78 79 |
# File 'lib/weibo2/interface/account.rb', line 77 def profile_school_list(opts={}) get 'account/profile/school_list.json', :params => opts end |
#rate_limit_status ⇒ Object
获取当前登录用户的API访问频率限制情况
84 85 86 |
# File 'lib/weibo2/interface/account.rb', line 84 def rate_limit_status get 'account/rate_limit_status.json' end |
#update_privacy(opts = {}) ⇒ Object
更新当前登录用户的隐私设置 [Privilege]
200 201 202 |
# File 'lib/weibo2/interface/account.rb', line 200 def update_privacy(opts={}) post 'account/update_privacy.json', :body => opts end |