2012年2月22日星期三

Taiwan High Speed Rail data RESTful API Documentation

Dear friends,

You can now access Taiwan High Speed Rail (THSR) data with following RESTful API.

To list all THSR stops information:
Format:JSON

JSON Definition
  • name:The stop name
  • id:Random ID
  • latitude:The latitude of the stop
  • longitude:The longitude of the stop
Example Request:GET http://api.accesstaiwan.org/traffic/hsr/stops/

To get single THSR stop information:
Format:JSON

Example Request:GET http://api.accesstaiwan.org/traffic/hsr/stops/Taipei

To list all THSR trains information:
Format:JSON
 
JSON Definition
  • trainId:Unique hsr train id
  • onlyOnDayOfWeek:An array to represent the train is only departure on weekend
  • stopTimes:The stop name and time of the train
Example Request:http://api.accesstaiwan.org/traffic/hsr/trains/

To list THSR trains between two stops:
  • GET /traffic/hsr/trains/{from}/{to}
Format:JSON

Example Request:http://api.accesstaiwan.org/traffic/hsr/trains/Taipei/Hsinchu

1 則留言: