Class: KHL::HTTP::GuildEmoji
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
-
#create(guild_id, emoji, options = {}) ⇒ KHL::HTTP::Response
创建服务器表情.
-
#delete(id) ⇒ KHL::HTTP::Response
删除服务器表情.
-
#list(guild_id, options = {}) ⇒ KHL::HTTP::Response
获取服务器表情列表.
-
#update(name, 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
#create(guild_id, emoji, options = {}) ⇒ KHL::HTTP::Response
创建服务器表情
26 27 28 |
# File 'lib/khl/http/guild_emoji.rb', line 26 def create(guild_id, emoji, = {}) post_file(.merge(content_type: "multipart/form-data", guild_id: guild_id, emoji: emoji)) end |
#delete(id) ⇒ KHL::HTTP::Response
删除服务器表情
41 42 43 |
# File 'lib/khl/http/guild_emoji.rb', line 41 def delete(id) post(id: id) end |
#list(guild_id, options = {}) ⇒ KHL::HTTP::Response
获取服务器表情列表
16 17 18 |
# File 'lib/khl/http/guild_emoji.rb', line 16 def list(guild_id, = {}) get(.merge(guild_id: guild_id)) end |
#update(name, id) ⇒ KHL::HTTP::Response
更新服务器表情
34 35 36 |
# File 'lib/khl/http/guild_emoji.rb', line 34 def update(name, id) post(name: name, id: id) end |