“插件js接口”的版本间的差异

来自uucall
跳转至: 导航搜索
(创建页面,内容为“== 分机签入 == === 说明 === 接口类型:js函数请求(默认工作状态为不可回接模式)<br /> 插件接口函数:Check_InOut(const FB::JSObj...”)
 
第74行: 第74行:
 
| login_notify || reg_ext_failed || 无 || 无 || 注册分机失败
 
| login_notify || reg_ext_failed || 无 || 无 || 注册分机失败
 
|}
 
|}
 +
 +
== 分机签出 ==
 +
=== 说明 ===
 +
接口类型:js函数请求
 +
插件接口函数:Check_InOut
 +
接口参数:签出标签,回调函数名称
 +
接口返回值:JSON格式返回结果
 +
 +
=== 示例 ===
 +
Function xxxxx() {
 +
    var param = '{"functionsname": "checkout"}';
 +
    plugin().Check_InOut(check_inout_result, param);
 +
}
 +
 +
=== 参数说明 ===
 +
{| class="wikitable"
 +
|-
 +
! 类型 !! 参数名 !! 描述 !! 是否必填 !! 数据类型 !! 默认值
 +
|-
 +
| 参数 || functionsname || 签出 || true || string || checkout
 +
|-
 +
| 参数 || sCallback || 当前API回调函数 || true || JSObjectPtr || 示例
 +
|}
 +
 +
=== 响应 ===
 +
同步请求响应:{ state:返回执行状态, error_code:结果代码,msg:描述}
 +
{| class="wikitable"
 +
|-
 +
! state !! error_code !! msg
 +
|-
 +
| logout_success || 200 || 操作成功
 +
|}
 +
 +
== 改变工作状态 ==
 +
=== 说明 ===
 +
接口类型:js函数请求
 +
插件接口函数:Work_State
 +
接口参数:工作状态(离开--away  小休--rest 可回接--forecast 不可回接--onekey)
 +
接口返回值:JSON格式返回结果

2016年3月29日 (二) 13:54的版本

分机签入

说明

接口类型:js函数请求(默认工作状态为不可回接模式)
插件接口函数:Check_InOut(const FB::JSObjectPtr sCallback, std::string sParmer)
接口参数:签入标签,服务器IP或域名,企业用户名,账号,密码,回调函数名称
接口返回值:JSON格式返回结果

示例

Function xxxxx() {
   var param = '{"functionsname": "checkin", "domain": "myservice.uucall.cn", "user_name": "zhangsan", "account": "admin", "password": "123456"}';
   plugin().Check_InOut(check_inout_result, param);
}

参数说明

类型 参数名 描述 是否必填 数据类型 默认值
参数 functionsname 功能标签 true string checkin
参数 domain 服务器IP或域名 true string
参数 user_name 企业用户名 true string
参数 account 账号 true string
参数 password 密码 true string
参数 sCallback 当前API回调函数 true string

响应

同步请求响应: { state:返回执行状态, error_code:结果代码,msg:描述}

state error_code msg
operation_failed 110 操作失败
operation_success 200 操作成功

异步签入结果全局回调函数响应: {mark:标志 state:返回执行状态, error_code:结果代码,msg:描述}

mark state client_type error_code msg
login_notify loging_success web_client 签入成功,客户端是web插件
login_notify loging_success sip_client 签入成功,客户端是sip话机
login_notify loging_success other_client 签入成功,客户端是固话/手机
login_notify need_relogin 需要重新登录
login_notify domain_failed 域名解析失败
login_notify connect_failed 系统连接失败
login_notify transport_failed 系统传输失败
login_notify system_error 101 系统错误,无此账号
login_notify system_error 102 系统错误,密码错误
login_notify system_error 103、104、105 系统错误,不可用账号
login_notify system_error 107 系统错误,未绑定分机
login_notify reg_ext_failed 注册分机失败

分机签出

说明

接口类型:js函数请求 插件接口函数:Check_InOut 接口参数:签出标签,回调函数名称 接口返回值:JSON格式返回结果

示例

Function xxxxx() {
   var param = '{"functionsname": "checkout"}';
   plugin().Check_InOut(check_inout_result, param);
}

参数说明

类型 参数名 描述 是否必填 数据类型 默认值
参数 functionsname 签出 true string checkout
参数 sCallback 当前API回调函数 true JSObjectPtr 示例

响应

同步请求响应:{ state:返回执行状态, error_code:结果代码,msg:描述}

state error_code msg
logout_success 200 操作成功

改变工作状态

说明

接口类型:js函数请求 插件接口函数:Work_State 接口参数:工作状态(离开--away 小休--rest 可回接--forecast 不可回接--onekey) 接口返回值:JSON格式返回结果