data:swiss-transport

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
data:swiss-transport [2012/03/20 13:02] – created lolegdata:swiss-transport [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-Swiss public transport API +====== Transport API ======
-Introduction +
-The Transport API allows interested developers to build their own applications using public timetable data, whether they're on the web, the desktop or mobile devices. Find out more about how you can start exploring the timetable data playground or just browse the API Documentation. +
-API Documentation +
-The Transport API builds on REST style resources which respond in JSON. Individual resources are detailed below. +
- +
-/stations +
-/connections /stationboard +
-Returns the matching locations for the given parameters. +
-The locations in the response are scored to determine which is the most exact location. This method can return a refine response, what means that the request has to be redone. +
-Resource URL +
-http://transport.opendata.ch/v1/locations +
-Request Parameters +
-Name +
-query +
-type +
-Required +
-Description +
-Example +
-Basel +
-address +
-required +
-Specifies the location name to search for +
-optional +
-Specifies the location type, possible types are: +
-all (default): Looks up for all types of locations +
-station: Looks up for stations (train station, bus station) poi: Looks up for points of interest (Clock tower, China garden) +
-address: Looks up for an address (Zurich Bahnhofstrasse 33) +
- +
-Response parameters +
-Name +
-id +
-type +
-name +
-score +
-coordinates type +
-+
-+
-Example Request +
-Description +
-The id of the location +
-Type of the location, can contain: +
-station: Location is a train station, bus station +
-poi: Location is a point of interest (Clock tower, China garden) address: Location is an address +
-refine: Location is not defined, the user has to relocate +
-The location name +
-The accuracy of fire +
-The type of the given coordinate Latitude +
-Longitude+
  
-=== Example Request === +See details here: [[project:transport_api|Transport API]].
-<code> +
-GET http://transport.opendata.ch/v1/locations?query=Basel +
-</code> +
- +
-=== Example response === +
-<code> +
-{ +
-"stations": [ +
-+
-"coordinate"+
-"type": "WGS84", "x": "8540192", "y": "47378177" +
-}, +
-"id": "008503000", "name": "Zuerich", "score": "100" +
-}, { +
-</code>+
  • data/swiss-transport.1332244932.txt.gz
  • Last modified: 2012/03/20 00:00
  • (external edit)