Usage of open data
ver1.1 Mon Dec 21 2015 18:00:00 GMT+0900 (JST)
/api/route.php
Route
Examples
/api/route.phpURL | HTTP Method |
---|---|
/api/route.php | GET |
Type:Array[Object]
Field | Type | Description | Notes |
---|---|---|---|
id | String | Route ID | |
name | String | Route name | |
color | String | Route color | |
image | String | Bus icon | Fetch /bus_img/{filename} |
/api/path.php
Route path
Examples
/api/path.php?id=lao1URL | HTTP Method |
---|---|
/api/route.php | GET |
Parameter | Type | Description |
---|---|---|
id | String | Route ID |
Type:Array[Array[Object]]
Field | Type | Description | Notes |
---|---|---|---|
lat | Number | Latitude | |
lng | Number | Longitude | |
isTunnel | Boolean | Tunnel flag | 0:false, 1:true |
/api/bus.php
Bus
Examples
/api/bus.phpURL | HTTP Method |
---|---|
/api/bus.php | GET |
Type:Array[String]
Field | Type | Description | Notes |
---|---|---|---|
String | Bus ID |
/api/busstop.php
Bus stop
Examples
/api/busstop.phpURL | HTTP Method |
---|---|
/api/busstop.php | GET |
Type:Array[Object]
Field | Type | Description | Notes |
---|---|---|---|
id | String | Bus stop ID | |
name | String | Bus stop name | |
lat | Number | Latitude | |
lng | Number | Longitude |
/api/busstop_order.php
Bus stop order
Examples
/api/busstop_order.php?id=lao1URL | HTTP Method |
---|---|
/api/busstop_order.php | GET |
Parameter | Type | Description |
---|---|---|
id | String | Route ID |
Type:Array[String]
Field | Type | Description | Notes |
---|---|---|---|
String | Bus stop ID | Sorted array |
/api/location.php
Latest bus location
Examples
URL | HTTP Method |
---|---|
/api/location.php | GET |
Parameter | Type | Description |
---|---|---|
ids | Array | Array of bus id(s) |
Type:Object
Field | Type | Description | Notes |
---|---|---|---|
id | String | Bus ID | |
status | Number | status | 0:out of service, 1:service, 2:trouble |
route_id | String | Route ID | |
lat | Number | Latitude | |
lng | Number | Longitude | |
accuracy | Number | Accuracy | meter |
speed | Number | Speed | m/s |
heading | Number | Hedding | 0~360deg |
date | Date | Date | GMT+0900 (JST) |