非洲旅游App接口说明

Welcome use !

ip

http://readshe.com/fast

登陆(Post)

1
2
3
4
5
url:/api/doLogin
params:
loginName //必须
password //必须
result:

动物、植物、鸟类展示列表(Post)

1
2
3
4
5
6
7
8
url:/api/objectsList
params:
types //必须 "animal" or "animal,bird" or "animal,bird,plant"
name //cnName or enName
orderBy //"rareLeavel desc" or "rareLeavel asc" 稀有程度排序
page // 1 or 2 or 3 从1开始
rows //10
result:

动物、植物、鸟类详情(Post)

1
2
3
4
url:/api/objectsDetail
params:
id //必须
result:

国家列表(Post)

1
2
3
4
5
6
url:/api/countryList
params:
page //必须 1 or 2 or 3 从1开始
rows //必须 10
name_string_like // "肯尼亚Kenya"
result:

景点列表(Post)

1
2
3
4
5
6
url:/api/placeList
params:
page //必须 1 or 2 or 3 从1开始
rows //必须 10
cnName-enName_string_like // "内罗毕"
result:

故事列表(Post)

1
2
3
4
5
6
url:/api/storyList
params:
page //必须 1 or 2 or 3 从1开始
rows //必须 10
name_string_like // "绿带运动"
result:

酒店列表(Post)

1
2
3
4
5
6
url:/api/hotelList
params:
page //必须 1 or 2 or 3 从1开始
rows //必须 10
cnName-enName_string_like // "东方钻石星酒店"
result:

行程列表

1
2
3
url:/api/planList
params:null
result:

我的行程

1
2
3
4
url:/api/myPlan
params:
planId //必须,这个planId是用户登录之后从用户信息里面取出
result:

收藏

1
2
3
4
5
6
7
url:/api/collect
params:
name //必须|收藏标题,比如收藏的某个景点名称
userId //必须
tableName //必须|"objects","place","country","story","hotel"
tableId //必须 | 比如收藏的某个景点的id
result:

收藏列表

1
2
3
4
5
6
7
url:/api/collectList
params:
page //必须 1 or 2 or 3 从1开始
rows //必须 10
userId_long_eq //必须 |用户ID
name_string_like //"东方钻石星酒店"
result:

分享

1
2
3
4
5
6
7
url:/api/share
params:
name //必须|分享标题,比如分享的某个景点名称
userId //必须
tableName //必须|"objects","place","country","story","hotel"
tableId //必须 | 比如分享的某个景点的id
result:

分享列表

1
2
3
4
5
6
7
url:/api/planList
params:
page //必须 1 or 2 or 3 从1开始
rows //必须 10
userId_long_eq //必须 |用户ID
name_string_like //"东方钻石星酒店"
result:

全文搜索

1
2
3
4
url:/api/search
params:
keyWord //必须 | 搜索5张表的数据 ("objects","place","country","story","hotel")
result:如下结构
1
{"code":200,"msg":"成功","data":{"story":[],"hotel":[],"place":[],"objects":[],"country":[]}}

详情|通用

1
2
3
4
5
url:/api/view
params:
tableName //必须 | 支持5张表 ("objects","place","country","story","hotel")
tableId //必须
result:如下结构

返回码说明

1
2
3
4
5
6
7
8
9
10
11
public static final int success = 200;//成功
public static final int exception = 500;//服务器出错
public static final int error_loginNamePwd = 400;//用户名密码错误
public static final int error_nullParams = 401;//有null参数
public static final int error_tableName = 402;//tableName参数错误
public static final String msg_success = "成功";
public static final String msg_exception = "服务器出错";
public static final String msg_error_loginNamePwd = "用户名密码错误";
public static final String msg_error_nullParams = "有null或者\"\"参数";
public static final String msg_error_tableName = "tableName参数错误";