allstations接口
URL: |
http:// <BusServer-URL> / allstations |
父资源: |
BusServer |
[ 服务说明 ]
allstations 接口用于以分页的形式返回所有的公交站点。
[ 参数说明 ]
[ 请求接口参数 ]
参数 | 参数说明 |
---|---|
start |
 参数是否必须:是  参数含义:获取记录的起始位置,值>=1 |
limit |
 参数是否必须:是  参数含义:从起始位置开始要返回的记录条数 |
[ 返回结果参数 ]
参数 | 参数说明 | |
state | 参数含义:状态,true 表示成功,false 表示失败 | |
array | id | 参数含义:公交路线的ID 编号 |
name | 参数含义:公交路线的名称 |
[ 示例 ]
allstations请求接口示例:
http://127.0.0.1:8099/newmap/rest/services/公交/changzhibus/BusServer/allstations?start=1&limit=5&format= json
[ 返回结果 ]
allstations操作成功时的返回结果示例 :
{"state":true,"array":[{"id":0,"name":"114 地质队"},{"id":1,"name":"114 地质队"},
{"id":2,"name":"66426 部队"},{"id":3,"name":"66426 部队"},{"id":4,"name":"安城"}]}
allstations操作失败时的返回结果示例 :
{
"state":false,"describe":"Missing 'start'Parameter"}
"state":false,"describe":"Missing 'start'Parameter"}