Class: Rails::Ding::ChatService

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/ding/chat_service.rb

Class Method Summary collapse

Class Method Details

.bindChat(accessToken, chatid, agentid) ⇒ Object



10
11
12
13
# File 'lib/rails/ding/chat_service.rb', line 10

def self.bindChat(accessToken, chatid,agentid)
 response = HttpService.get("/chat/bind?",{access_token: accessToken,chatid: chatid,agentid: agentid})
 return response
end

.createChat(accessToken, chatOpt) ⇒ Object



5
6
7
8
# File 'lib/rails/ding/chat_service.rb', line 5

def self.createChat(accessToken, chatOpt)
  response = HttpService.post("/chat/create?", {access_token: accessToken}, chatOpt.to_json)
  return response
end

.sendmsg(accessToken, opt) ⇒ Object



15
16
17
18
# File 'lib/rails/ding/chat_service.rb', line 15

def self.sendmsg(accessToken, opt)
  response = HttpService.post("/chat/send?", {access_token: accessToken}, opt.to_json)
  return response
end