更新时间:2023-10-11 GMT+08:00
实现过程
涉及接口
- 登录(login)
请求的url:https://ip:port/agentgateway/resource/onlineagent/{agentid}
请参考签入
- 强制登录(forcelogin)
请求的url:https://ip:port/agentgateway/resource/onlineagent/{agentid}/forcelogin
请参考强制签入
- 设置技能队列(resetSkill)
请求的url:https://ip:port/agentgateway/resource/onlineagent/{agentid}/resetskill/{autoflag}?skillid={skillid}&phonelinkage={phonelinkage}
请参考重置技能队列
- 获取座席事件(getAgentEvent)
请求的url:https://ip:port/agentgateway/resource/agentevent/{agentid}
请参考轮询方式获取单座席事件
如何发送PUT的HTTP请求
请参考MainTest.java中的
/** * Send http's PUT request * @param url the address of the request * @param entityParams the paramters of entity * @param headers the field is used to set the header of http request * @return */ public Map<string, string> put(string url, Map<string, Object> entityParams, Map<string, string> headers)
如何发送POST的HTTP请求
请参考MainTest.java中的
/** * Send http's POST request * @param url the address of the request * @param entityParams the paramters of entity * @param headers the field is used to set the header of http request * @return */ public Map<string, string> post(string url, Map<string, Object> entityParams, Map<string, string> headers)
如何发送GET的HTTP请求
请参考MainTest.java中的
/** * Send http's POST request * @param url the address of the request * @param entityParams the paramters of entity * @param headers the field is used to set the header of http request * @return */ public Map<string, string> get(string url, Map<string, Object> entityParams, Map<string, string> headers)
实现登录接口
请参考MainTest.java中的
/** * log in * @param workNo the work no of the agent * @param password the password of the agent * @param phoneNumber the phone number of the agent * @return */ public Map<string, string> login(string workNo, string password, string phoneNumber)
实现强制登录接口
请参考MainTest.java中的
/** * When agent has logged in, call the interface to forcibly log in * @param workNo the work no of the agent * @param password the password of the agent * @param phoneNumber the phone number of the agent * @return */ public Map<string, string> forceLogin(string workNo, string password, string phoneNumber)
实现签入技能队列接口
请参考MainTest.java中的
/** * After log in, reset the skills * @param workNo the work no of the agent * @param autoFlag Is automatically signed into the skill queue * @param skillId the id of the skill. if has more than one skill that need to be sign, it's split by ; * @param headers the field is used to set the header of http request * @return */ public Map<string, string> resetSkill(string workNo, boolean autoFlag, string skillId, Map<string, string> headers)
实现获取座席事件接口
请参考MainTest.java中的
/** * Get the agent's event * @param workNo workNo the work no of the agent * @param headers the field is used to set the header of http request * @return */ public Map<string, string> getAgentEvent(string workNo, Map<string, string> headers)
父主题: 第一次应用开发