Class: KHL::HTTP::UserChat
Overview
私信聊天会话相关接口 developer.kaiheila.cn/doc/http/user-chat
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(target_id) ⇒ KHL::HTTP::Response
创建私信聊天会话.
-
#delete(target_id) ⇒ KHL::HTTP::Response
删除私信聊天会话.
-
#list(options = {}) ⇒ KHL::HTTP::Response
获取私信聊天会话列表.
-
#view(chat_code) ⇒ 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(target_id) ⇒ KHL::HTTP::Response
创建私信聊天会话
29 30 31 |
# File 'lib/khl/http/user_chat.rb', line 29 def create(target_id) post(target_id: target_id) end |
#delete(target_id) ⇒ KHL::HTTP::Response
Note:
只能删除自己的消息
删除私信聊天会话
37 38 39 |
# File 'lib/khl/http/user_chat.rb', line 37 def delete(target_id) post(target_id: target_id) end |
#list(options = {}) ⇒ KHL::HTTP::Response
获取私信聊天会话列表
15 16 17 |
# File 'lib/khl/http/user_chat.rb', line 15 def list( = {}) get() end |
#view(chat_code) ⇒ KHL::HTTP::Response
获取私信聊天会话详情
22 23 24 |
# File 'lib/khl/http/user_chat.rb', line 22 def view(chat_code) get(chat_code: chat_code) end |