@931876502
2016-06-14T09:22:05.000000Z
字数 13356
阅读 574
aladinApi
版本号:
1.5.0
部门:研发部
岗位:服务端开发人员
姓名:杨松
建立日期:2016-2-17
更新日期:2016-4-6 20:30
https://www.getpostman.com/collections/2971e0c220a3d570580a{{HOSTNAME}}
TEST =
DEVE = http://aladinsrv.dev.dlhis.com
PREPRO
PRODUCTION
IMEIGET{{HOSTNAME}}/api/resource/bzdata/{IMEI},IMEI是参数json
{"data": {"bzDataApi": {"dateTime": "2016-02-25 15:27:59","hotelName": "迪联大酒店","roomInfos": [{"rmiAvl": 1,"rmiCode": "A11","rmiMark": "海景天窗","rmiName": "呵呵房","rmiTitleImg": "1","tableBody": {"price0": "8888","price1": "6666"}},{"rmiAvl": 1,"rmiCode": "A12","rmiMark": "","rmiName": "嘎嘎房","rmiTitleImg": "1","tableBody": {"price0": "8888","price1": "6666"}}],"scrollTime": "10000","scrollTxt": "欢迎光临!","tableHead": {"col0": "房型","col1": "门市价","col2": "今日价"},"weather": [{"cityCode": "CN101210101","tempMax": "9","tempMin": "1","type1": "多云","type2": "多云","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-24 00:00:00","wthIcon": "wi-day-cloudy","wthId": 1},{"cityCode": "CN101210101","tempMax": "12","tempMin": "4","type1": "多云","type2": "阴","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-25 00:00:00","wthIcon": "wi-day-cloudy","wthId": 2},{"cityCode": "CN101210101","tempMax": "14","tempMin": "5","type1": "阴","type2": "多云","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-26 00:00:00","wthIcon": "wi-day-windy","wthId": 3},{"cityCode": "CN101210101","tempMax": "17","tempMin": "5","type1": "阴","type2": "多云","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-27 00:00:00","wthIcon": "wi-day-windy","wthId": 4},{"cityCode": "CN101210101","tempMax": "16","tempMin": "4","type1": "多云","type2": "多云","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-28 00:00:00","wthIcon": "wi-day-cloudy","wthId": 5},{"cityCode": "CN101210101","tempMax": "16","tempMin": "5","type1": "晴","type2": "晴","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-29 00:00:00","wthIcon": "wi-day-sunny","wthId": 6},{"cityCode": "CN101210101","tempMax": "20","tempMin": "5","type1": "晴","type2": "晴","updateTime": "2016-02-24 11:22:43","wthDate": "2016-03-01 00:00:00","wthIcon": "wi-day-sunny","wthId": 7}],"weekday": "星期四"}},"err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
datetime:当前时间weekday:星期scorllTxt:滚动文字scrollTime:滚动文字切换时间hotelName:酒店门店名称tableHead:表格头roomInfos:房间信息列表 rmiAvl: 满房状态rmiCode: 房型代码 rmiMark: 特殊标记rmiName: 房型名称rmiTitleImg: 封面图片tableBody:表格body内容weather:未来七天天气预报 wthId:天气代码cityCode: 城市编码wthDate: 天气日期 tempMax: 最高温度tempMin: 最低温度type1: 天气类型1 type2: 天气类型2 wthIcon: 天气图标updateTime:更新时间 - 接口参数:`IMEI`
- 请求类型:`GET`
- 请求地址:`{{HOSTNAME}}/api/resource/templetdata/{IMEI}`,IMEI是参数
- 返回值
- 返回值类型:`json`
- 返回值结构: 例
{"data": {"templetApi": {"files": {"cssFiles": {"css":"tmp1.css"},"imgFiles": {"bg_img":"bg_img.jpg"},"jsFiles": {"js":"tmp1.js"},"otherFiles": {"icon1":"icon1.png"},"styleData": {"font_color": "#f1d096"}},"startUrl": "/#/index/2","tplIndex": "0"}},"err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
- - 返回值说明:
- 参数:
1. `startUrl`:设备启动链接
2. `tplIndex`: 模板更新索引
3. `files`:模板文件
- `imgFiles`: 图片文件
- `cssFiles`: 样式文件
- `jsFiles`: js文件
- `otherFiles`: 其他文件
IMEI,rmiCodeGET {{HOSTNAME}}/api/resource/roomdetail?IMEI=1&rmiCode=A11,IMEI和rmiCode是参数json
{"data": {"detailApi": {"details": [{"des": "床品描述","img": "","title": "床铺位"},{"des": "景观描述","img": "","title": "阳台景观"}],"rmiCode": "A11","showTime": "60000"}},"err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
rmiCode:房型编码showTime:该详情页自动返回main页的时间details:房型详情 des: 文字描述img: 展示图片 title: 标题 省份和城市名称citycode:城市编码 GET {{HOSTNAME}}/api/weather/getweather/{省份}/{城市},如浙江是省份参数,杭州是城市名称参数{{HOSTNAME}}/api/weather/getweather/{citycode},citycode是城市编码,如:CN101210101 json
{"data": {"forecast": [{"cityCode": "CN101210101","tempMax": "9","tempMin": "1","type1": "多云","type2": "多云","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-24 00:00:00","wthIcon": "wi-day-cloudy","wthId": 1},{"cityCode": "CN101210101","tempMax": "12","tempMin": "4","type1": "多云","type2": "阴","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-25 00:00:00","wthIcon": "wi-day-cloudy","wthId": 2},{"cityCode": "CN101210101","tempMax": "14","tempMin": "5","type1": "阴","type2": "多云","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-26 00:00:00","wthIcon": "wi-day-windy","wthId": 3},{"cityCode": "CN101210101","tempMax": "17","tempMin": "5","type1": "阴","type2": "多云","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-27 00:00:00","wthIcon": "wi-day-windy","wthId": 4},{"cityCode": "CN101210101","tempMax": "16","tempMin": "4","type1": "多云","type2": "多云","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-28 00:00:00","wthIcon": "wi-day-cloudy","wthId": 5},{"cityCode": "CN101210101","tempMax": "16","tempMin": "5","type1": "晴","type2": "晴","updateTime": "2016-02-24 11:22:43","wthDate": "2016-02-29 00:00:00","wthIcon": "wi-day-sunny","wthId": 6},{"cityCode": "CN101210101","tempMax": "20","tempMin": "5","type1": "晴","type2": "晴","updateTime": "2016-02-24 11:22:43","wthDate": "2016-03-01 00:00:00","wthIcon": "wi-day-sunny","wthId": 7}]},"err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
- 参数:
1. `forecast`:未来七天天气预报
- `wthId`:天气代码
- `cityCode`: 城市编码
- `wthDate`: 天气日期
- `tempMax`: 最高温度
- `tempMin`: 最低温度
- `type1`: 天气类型1
- `type2`: 天气类型2
- `wthIcon`: 天气图标
- `updateTime`:更新时间
all:更新所有hotel_info表中所有城市天气citycode:根据城市编码更新单个城市天气 GET {{HOSTNAME}}/api/weather/refresh/{all},all是参数{{HOSTNAME}}/api/weather/refresh/{citycode},citycode是城市编码 如:CN101210101 json
{"data": "恭喜你!共2个城市天气更新已完成!","err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
{"data": {"updateData": [{"cityCode": "CN101210101","tempMax": "13","tempMin": "4","type1": "多云","type2": "多云","updateTime": "2016-02-25 15:43:04","wthDate": "2016-02-25 00:00:00","wthIcon": "wi-day-cloudy","wthId": 1},{"cityCode": "CN101210101","tempMax": "14","tempMin": "6","type1": "阴","type2": "多云","updateTime": "2016-02-25 15:43:04","wthDate": "2016-02-26 00:00:00","wthIcon": "wi-day-windy","wthId": 2},{"cityCode": "CN101210101","tempMax": "18","tempMin": "8","type1": "多云","type2": "多云","updateTime": "2016-02-25 15:43:04","wthDate": "2016-02-27 00:00:00","wthIcon": "wi-day-cloudy","wthId": 3},{"cityCode": "CN101210101","tempMax": "19","tempMin": "6","type1": "多云","type2": "阴","updateTime": "2016-02-25 15:43:04","wthDate": "2016-02-28 00:00:00","wthIcon": "wi-day-cloudy","wthId": 4},{"cityCode": "CN101210101","tempMax": "12","tempMin": "3","type1": "多云","type2": "晴","updateTime": "2016-02-25 15:43:04","wthDate": "2016-02-29 00:00:00","wthIcon": "wi-day-cloudy","wthId": 5},{"cityCode": "CN101210101","tempMax": "14","tempMin": "6","type1": "晴","type2": "多云","updateTime": "2016-02-25 15:43:04","wthDate": "2016-03-01 00:00:00","wthIcon": "wi-day-sunny","wthId": 6},{"cityCode": "CN101210101","tempMax": "17","tempMin": "9","type1": "晴","type2": "阴","updateTime": "2016-02-25 15:43:04","wthDate": "2016-03-02 00:00:00","wthIcon": "wi-day-sunny","wthId": 7}]},"err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
forecast:未来七天天气预报 wthId:天气代码cityCode: 城市编码wthDate: 天气日期 tempMax: 最高温度tempMin: 最低温度type1: 天气类型1 type2: 天气类型2 wthIcon: 天气图标updateTime:更新时间GET {{HOSTNAME}}/api/weather/refreshalljson
{"data": "恭喜你!共2个城市天气更新已完成!","err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
msg:请求结果信息statusNo:请求状态码data:更新失败为空sendphone string型sendcontent string型 GET {{HOSTNAME}}/api/sms/sendmessage?sendphone=180xxxx5373&sendcontent=验证码:7045,sendphone是接受短信手机号码,sendcontent是发送短信内容json
{"data": {},"err": "nothing","msg": "success","re": {"Code": 0,"Descript": "短信提交成功"},"reErr": {},"statusNo": 200}
re:返回发送短信结果 Code:结果代码Descript: 结果描述IMEI GET {{HOSTNAME}}/api/resource/deviceinfo/{IMEI},IMEI是参数json
{"data": {"deviceinfoApi": {"APKPATH": null,"deviceinfo": {"authEndtime": "2017-02-02 15:37:32","conn_id": {"apk": "bb1a7c27-161f-49aa-b049-39adde803cba","detail": "4d5bd08d-8ba1-4808-b6a4-f3b6fd245e52"},"createTime": "2016-02-02 15:37:32","dvcId": 3,"dvcName": "设备1","dvc_imei": "1","hotelId": "123456","lastOntime": "2016-02-02 15:37:32","logTime": "2016-02-02 15:37:32","resIndex": 1,"scrollTime": 10000,"scrollTxt": "欢迎光临!","sta": "T","starturl": "/#/index/1","targetVersion": "1.0.0","thisVersion": "1.0.0","tplId": 1,"uId": 1}}},"err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
APKPATH:apk应用下载地址deviceinfo:设备信息 conn_id: WebSocket连接IDauthEndtime: 授权截止 dvcName: 设备名称createTime: 信息录入时间dvcId:设备IDdvc_imei:设备imei编号hotelId:所属酒店IDlastOntime:上次开机时间logTime:resIndex:设备资源索引值,发生更新,即+1scrollTxt:设备滚动文本scrollTime:切换时间starturl:设备启动链接targetVersion:目标版本号thisVersion:当前版本号tplId:模板IDuId:用户IDtpl_id integer型tpl_files json型GET {{HOSTNAME}}/api/resource/updatetemplet?tpl_id=1&tpl_files={"files":{"cssFiles":[{"css":"tmp1.css"}]}},tpl_id是模板ID,tpl_files是待更新模板文件 json
{"data": {},"err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
post
tplCode=tpl00002tplFiles={"imgFiles": {"bg": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-bg-aladdin-back02.jpg","border01": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_01.png","border02": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_02.png"},"cssFiles": [{"css": "http://qiniu-aladin.dlhis.com/css%2Faladin-base-v100.min.css"},{"css": "http://qiniu-aladin.dlhis.com/css%2Faladin-partial-v100.min.css"},{"css": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tpl-tpl00002.css"}],"jsFiles": {"js": "tmp1.js"},"otherFiles": {"icon1": "icon1.png"},"styleData": {"font_color": "#dc4bd1"}}tplViewImg=["http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tplView-tpl00002.jpg"]
tplCode:模板编号 tplFiles:模板所需文件 tplViewImg:模板预览图 json
{"data": "更新成功!","err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
{"data": {},"err": "TPLCODE IS NOT ESISTS!","msg": "TPLCODE不存在,请检查后重试!","re": {},"reErr": {},"statusNo": 400}
msg:请求结果信息statusNo:请求状态码data:更新失败为空PUT
{"tplCode": "tpl00002","tplFiles": {"imgFiles": {"bg": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-bg-aladdin-back02.jpg","border01":"http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_01.png","border02":"http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_02.png"},"cssFiles": [{"css": "http://qiniu-aladin.dlhis.com/css%2Faladin-base-v100.min.css"},{"css": "http://qiniu-aladin.dlhis.com/css%2Faladin-partial-v100.min.css"},{"css": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tpl-tpl00002.css"}],"jsFiles": [{"js": "tmp1.js"}],"otherFiles": {"icon1": "icon1.png"},"styleData": {"font_color": "#dc4bd1"}}}
tplCode:模板编号 tplFiles:模板所需文件 json
{"data": "更新成功!","err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
{"data": {},"err": "TPLCODE IS NOT ESISTS!","msg": "TPLCODE不存在,请检查后重试!","re": {},"reErr": {},"statusNo": 400}
msg:请求结果信息statusNo:请求状态码data:更新失败为空PUT
{"tplCode": "tpl00002","tplViewImg": ["http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tplView-tpl00002.jpg"]}
tplCode:模板编号 tplViewImg:模板预览图 json
{"data": "更新成功!","err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200}
{"data": {},"err": "TPLCODE IS NOT ESISTS!","msg": "TPLCODE不存在,请检查后重试!","re": {},"reErr": {},"statusNo": 400}
msg:请求结果信息statusNo:请求状态码data:更新失败为空POST
{"tplName": "添加测试","tplDes": "免费模板-测试","tplFiles": {"imgFiles": {"bg": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-bg-aladdin-back02.jpg","border01": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_01.png","border02": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_02.png"},"cssFiles": ["http://qiniu-aladin.dlhis.com/css%2Faladin-base-v100.min.css","http://qiniu-aladin.dlhis.com/css%2Faladin-partial-v100.min.css","http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tpl-tpl00002.css"],"jsFiles": ["tmp1.js"],"otherFiles": {"icon1": "icon1.png"},"styleData": {"font_color": "#dc4bd1"}},"tplViewImg": ["http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tplView-tpl00002.jpg"]}
tplName:模板名称 tplDes:模板描述 tplFiles:模板所需文件 tplViewImg:模板预览图 json
{"data": "添加成功!","err": "nothing","msg": "success","re": {},"reErr": {},"statusNo": 200,"version": "1.4.0"}
{"data": {},"err": "IMGFILES IS WRONG FORMAT!","msg": "IMGFILES不符合格式,请仔细检查格式!","re": {},"reErr": {},"statusNo": 400,"version": "1.4.0"}
msg:请求结果信息statusNo:请求状态码data:更新失败为空DOMAIN 主机域名定义 env
{{WSAPI}}
TEST =
DEVE = http://ws.dev.dlhis.com
PREPRO
PRODUCTION
- 请求类型:POST
- 请求地址(url):{{WSAPI}}/sock/order
- 接口参数:RequestBody json型
| 参数 | 中文名称 | 类型 | 举例 | 说明 |
|---|---|---|---|---|
| u_id | 推送用户 | String | "36" | |
| icon | 通知图标 | String | "http://qiniu-aladin.dlhis.com/dlhis_logo.png?imageView2/1/w/90/h/90" | 图标在七牛的链接地址 |
| title | 通知标题 | String | "标题" | |
| body | 通知内容 | String | "内容" | |
| url | 通知的连接地址 | String | "" | 没有就为空 |
{"u_id":"36","icon": "http://qiniu-aladin.dlhis.com/dlhis_logo.png?imageView2/1/w/90/h/90","title": "标题","body": "内容","url": ""}
json
{"msg": "success"}