Skip to content

Latest commit

 

History

History
52 lines (47 loc) · 1.15 KB

stations.md

File metadata and controls

52 lines (47 loc) · 1.15 KB

stations([opt])

Get all operated stations such as Berlin central bus station or Frankfurt Hbf. Returns a Promise that will resolve in an array of stations in the Friendly Public Transport Format. (This request may take a few seconds.)

With opt, you can override the default options, which look like this:

{
	key: 'uR=s7k6m=[cCS^zY86H8CNAnkC6n' // API key
}

Response

[
	{
		type: 'station',
		id: 14698,
		name: 'Aachen Hüls',
		street: 'Wilmersdorfer Straße',
		zip: '52068',
		address: 'Wilmersdorfer Straße, 52068 Aachen, Germany',
		coordinates: {
			latitude: 50.785761869444,
			longitude: 6.1371751064882
		},
		slug: 'aachen-huls-wilmersdorfer-strasse',
		aliases: [],
		regions: [243], // region (city) ids, doesn't include multiple regions (yet)
		connections: [
			11548,
			501,
			38,
			12,
			11417,
			2875,
			2865,
			4168,
			6198,
			8038
			// …
		],
		importance: 0,
		country: {
			name: 'Germany',
			code: 'DE'
		}
	}
	// …
]