Class: KHL::HTTP::Guild
Overview
Constant Summary
Constants inherited from Base
Base::API_VERSION, Base::BASE_URL, Base::END_POINT
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#kickout(guild_id, target_id) ⇒ KHL::HTTP::Response
踢出服务器.
-
#leave(guild_id) ⇒ KHL::HTTP::Response
离开服务器.
-
#list(options = {}) ⇒ KHL::HTTP::Response
获取当前用户加入的服务器列表.
-
#nickname(guild_id, options = {}) ⇒ KHL::HTTP::Response
修改服务器中用户的昵称.
-
#user_list(guild_id, options = {}) ⇒ KHL::HTTP::Response
获取服务器中的用户列表.
-
#view(guild_id) ⇒ KHL::HTTP::Response
获取服务器详情.
Methods inherited from Base
#get, #initialize, #post, #post_file
Constructor Details
This class inherits a constructor from KHL::HTTP::Base
Instance Method Details
#kickout(guild_id, target_id) ⇒ KHL::HTTP::Response
踢出服务器
65 66 67 |
# File 'lib/khl/http/guild.rb', line 65 def kickout(guild_id, target_id) post(guild_id: guild_id, target_id: target_id) end |
#leave(guild_id) ⇒ KHL::HTTP::Response
离开服务器
57 58 59 |
# File 'lib/khl/http/guild.rb', line 57 def leave(guild_id) post(guild_id: guild_id) end |
#list(options = {}) ⇒ KHL::HTTP::Response
获取当前用户加入的服务器列表
16 17 18 |
# File 'lib/khl/http/guild.rb', line 16 def list( = {}) get() end |
#nickname(guild_id, options = {}) ⇒ KHL::HTTP::Response
修改服务器中用户的昵称
50 51 52 |
# File 'lib/khl/http/guild.rb', line 50 def nickname(guild_id, = {}) post(.merge(guild_id: guild_id)) end |
#user_list(guild_id, options = {}) ⇒ KHL::HTTP::Response
获取服务器中的用户列表
40 41 42 |
# File 'lib/khl/http/guild.rb', line 40 def user_list(guild_id, = {}) get(.merge(guild_id: guild_id)) end |
#view(guild_id) ⇒ KHL::HTTP::Response
获取服务器详情
23 24 25 |
# File 'lib/khl/http/guild.rb', line 23 def view(guild_id) get(guild_id: guild_id) end |