Core

登录

URL http://www.boomrich.xin:8000/core/login/

Method POST

Group normal

Attribute Description
uid 用户ID
upw 用户密码
mac 设备mac地址

Response

{"message": "登录成功", "success": true, "action_id": "LOGIN", "action_name": "登录", "function_name": "login_view"}

注销

URL http://www.boomrich.xin:8000/core/logout/

Method POST/GET

Group normal

Response

{"message": "注销成功", "success": true, "action_id": "LOGOUT", "action_name": "注销", "function_name": "logout_view"}

注册

URL http://www.boomrich.xin:8000/core/register/

Method POST

Group normal

Attribute Description
uid 用户ID
upw 用户密码
uem 用户e-mail
grp 用户组(guard/blind/normal)

Response

{"message": "请注销后注册新用户", "success": false, "action_id": "CREATE_USER", "action_name": "注册", "function_name": "create_user_view"}

查询登录状态

URL http://www.boomrich.xin:8000/core/state/

Method POST/GET

Group normal

Response

{"message": "查询成功", "success": true, "username": "boomrich", "email": "[email protected]", "lastLogin": "CST2017-09-28T19:25:50", "action_id": "QUERY_LOGIN_STATE", "action_name": "查询登录状态", "function_name": "query_state_view"}

模块状态查询

URL http://www.boomrich.xin:8000/core/module/

Method POST

Group normal

Attribute Description
aid ACTION ID

Response

{"success": true, "message": "存在该模块", "query_action_id": "CUT_COMMAND", "query_regex": "^command/cut/"}

Command

指令分词

URL http://www.boomrich.xin:8000/command/cut/

Method POST

Group blind

Attribute Description
cmd 输入的指令
hmm hmm分词(可选)
all 全分词(可选)

Response

{"message": "分词成功", "success": true, "result": ["为", "盲人", "提供", "智能", "生活", "服务平台"], "action_id": "CUT_COMMAND", "action_name": "指令分词", "function_name": "cut_view"}

理解命令

URL http://www.boomrich.xin:8000/command/understand/

Method POST

Group blind

Attribute Description
cmd 输入的指令

Response

{"success": true, "message": "解析成功", "result": {"action": "Navigate", "Translation": "骑车", "Bike": "骑车", "Location": "西土城路 10 号", "ToLocation": "西土城路 10 号"}, "action_id": "UNDERSTAND_COMMAND", "action_name": "理解命令", "function_name": "command_view"}

Location

更新位置

URL http://www.boomrich.xin:8000/location/update/

Method POST

Group blind

Attribute Description
lon 经度
lat 纬度

Response

{"message": "位置更新成功", "success": true, "action_id": "UPDATE_LOCATION", "action_name": "更新位置", "function_name": "update_location"}

附件