Class: Kf5Api::Kchat

Inherits:
Object
  • Object
show all
Extended by:
Base
Defined in:
lib/kf5_api/kchat.rb

Constant Summary collapse

ACTIONS_HASH =
{
  history: '/apiv2/kchat/history',
  chat: '/apiv2/kchat/history/%{id}'
}

Class Method Summary collapse

Methods included from Base

basic_auth, get

Class Method Details

.chat(chat_id) ⇒ Object

查看对话



19
20
21
# File 'lib/kf5_api/kchat.rb', line 19

def chat(chat_id)
  get(format(ACTIONS_HASH[:chat], id: chat_id)).parsed_response
end

.history(query_params = {}) ⇒ Object

对话列表



14
15
16
# File 'lib/kf5_api/kchat.rb', line 14

def history(query_params = {})
  get(ACTIONS_HASH[:history], query_params).parsed_response
end