mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-11-04 10:06:32 +02:00 
			
		
		
		
	adapt docs & examples to bad0af8 📝
				
					
				
			This commit is contained in:
		
							parent
							
								
									bad0af8e25
								
							
						
					
					
						commit
						8b87868fba
					
				
					 10 changed files with 14 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
- [`departures(station, [opt])`](departures.md) – query the next departures at a station
 | 
			
		||||
- [`arrivals(station, [opt])`](arrivals.md) – query the next arrivals at a station
 | 
			
		||||
- [`locations(query, [opt])`](locations.md) – find stations, POIs and addresses
 | 
			
		||||
- [`station(id, [opt])`](station.md) – get details about a station
 | 
			
		||||
- [`stop(id, [opt])`](stop.md) – get details about a stop/station
 | 
			
		||||
- [`nearby(location, [opt])`](nearby.md) – show stations & POIs around
 | 
			
		||||
- [`radar(north, west, south, east, [opt])`](radar.md) – find all vehicles currently in a certain area
 | 
			
		||||
- [`reachableFrom(address, [opt])`](reachable-from.md) – get all stations reachable from an address within `n` minutes
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,12 +1,12 @@
 | 
			
		|||
# `station(id, [opt])`
 | 
			
		||||
# `stop(id, [opt])`
 | 
			
		||||
 | 
			
		||||
`id` must be in one of these formats:
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
// a station ID, in a format compatible with the profile you use
 | 
			
		||||
// a stop/station ID, in a format compatible with the profile you use
 | 
			
		||||
'900000123456'
 | 
			
		||||
 | 
			
		||||
// an FPTF `station` object
 | 
			
		||||
// an FPTF `stop`/`station` object
 | 
			
		||||
{
 | 
			
		||||
	type: 'station',
 | 
			
		||||
	id: '900000123456',
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ With `opt`, you can override the default options, which look like this:
 | 
			
		|||
 | 
			
		||||
```js
 | 
			
		||||
{
 | 
			
		||||
	stationLines: false, // parse & expose lines of the station?
 | 
			
		||||
	stationLines: false, // parse & expose lines of the stop/station?
 | 
			
		||||
	language: 'en' // language to get results in
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ const vbbProfile = require('hafas-client/p/vbb')
 | 
			
		|||
 | 
			
		||||
const client = createClient(vbbProfile, 'my-awesome-program')
 | 
			
		||||
 | 
			
		||||
client.station('900000042101') // U Spichernstr.
 | 
			
		||||
client.stop('900000042101') // U Spichernstr.
 | 
			
		||||
.then(console.log)
 | 
			
		||||
.catch(console.error)
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ client.journeys('900000003201', '900000024101', {results: 1, polylines: true})
 | 
			
		|||
// client.departures('900000013102', {duration: 1})
 | 
			
		||||
// client.arrivals('900000013102', {duration: 10, stationLines: true})
 | 
			
		||||
// client.locations('Alexanderplatz', {results: 2})
 | 
			
		||||
// client.station('900000042101', {stationLines: true}) // Spichernstr
 | 
			
		||||
// client.stop('900000042101', {stationLines: true}) // Spichernstr
 | 
			
		||||
// client.nearby({
 | 
			
		||||
// 	type: 'location',
 | 
			
		||||
// 	latitude: 52.5137344,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ client.journeys('000002370', '000005919', {results: 1, polylines: true})
 | 
			
		|||
// client.departures('000002370', {duration: 1})
 | 
			
		||||
// client.arrivals('000002370', {duration: 10, stationLines: true})
 | 
			
		||||
// client.locations('Westgate', {results: 2})
 | 
			
		||||
// client.station('000005534') // Downtown light rail station
 | 
			
		||||
// client.stop('000005534') // Downtown light rail station
 | 
			
		||||
// client.nearby({
 | 
			
		||||
// 	type: 'location',
 | 
			
		||||
// 	latitude: 30.266222,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@ client.journeys('8011167', '8000261', {results: 1, tickets: true})
 | 
			
		|||
// client.arrivals('8011167', {duration: 10, stationLines: true})
 | 
			
		||||
// client.locations('Berlin Jungfernheide')
 | 
			
		||||
// client.locations('Atze Musiktheater', {poi: true, addressses: false, fuzzy: false})
 | 
			
		||||
// client.station('8000309') // Regensburg Hbf
 | 
			
		||||
// client.stop('8000309') // Regensburg Hbf
 | 
			
		||||
// client.nearby({
 | 
			
		||||
// 	type: 'location',
 | 
			
		||||
// 	latitude: 52.4751309,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@ client.journeys('008010226', '008013456', {results: 1})
 | 
			
		|||
// client.arrivals('8010226', {duration: 10, stationLines: true})
 | 
			
		||||
// client.locations('Magdeburg Hbf', {results: 2})
 | 
			
		||||
// client.locations('Kunstmuseum Kloster Unser Lieben Frauen Magdeburg', {results: 2})
 | 
			
		||||
// client.station('008010226') // Magdeburg-Neustadt
 | 
			
		||||
// client.stop('008010226') // Magdeburg-Neustadt
 | 
			
		||||
// client.nearby({
 | 
			
		||||
// 	type: 'location',
 | 
			
		||||
// 	latitude: 52.148842,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@ client.journeys('8000103', '8000199', {results: 10, tickets: true})
 | 
			
		|||
// client.arrivals('8000199', {duration: 5, stationLines: true})
 | 
			
		||||
// client.trip('1|30161|5|100|14032018', 'Bus 52')
 | 
			
		||||
// client.locations('Schleswig', {results: 1})
 | 
			
		||||
// client.station('706990') // Kiel Holunderbusch
 | 
			
		||||
// client.stop('706990') // Kiel Holunderbusch
 | 
			
		||||
// client.nearby({
 | 
			
		||||
// 	type: 'location',
 | 
			
		||||
// 	latitude: 54.295691,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ client.journeys('1291501', '8100002', {results: 1})
 | 
			
		|||
// client.departures('8100002', {duration: 1})
 | 
			
		||||
// client.arrivals('8100002', {duration: 10, stationLines: true})
 | 
			
		||||
// client.locations('Salzburg', {results: 2})
 | 
			
		||||
// client.station('8100173') // Graz Hbf
 | 
			
		||||
// client.stop('8100173') // Graz Hbf
 | 
			
		||||
// client.nearby({
 | 
			
		||||
// 	type: 'location',
 | 
			
		||||
// 	latitude: 47.812851,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ const client = createClient(vbbProfile, 'hafas-client-example')
 | 
			
		|||
client.departures('8004154', {duration: 5})
 | 
			
		||||
// client.arrivals('8004154', {duration: 10, stationLines: true})
 | 
			
		||||
// client.locations('mittersendling', {results: 5})
 | 
			
		||||
// client.station('8004154', {stationLines: true}) // Mittersendling
 | 
			
		||||
// client.stop('8004154', {stationLines: true}) // Mittersendling
 | 
			
		||||
// client.nearby({
 | 
			
		||||
// 	type: 'location',
 | 
			
		||||
// 	latitude: 48.153858,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ client.journeys('900000003201', '900000024101', {results: 1, polylines: true})
 | 
			
		|||
// client.departures('900000013102', {duration: 1})
 | 
			
		||||
// client.arrivals('900000013102', {duration: 10, stationLines: true})
 | 
			
		||||
// client.locations('Alexanderplatz', {results: 2})
 | 
			
		||||
// client.station('900000042101', {stationLines: true}) // Spichernstr
 | 
			
		||||
// client.stop('900000042101', {stationLines: true}) // Spichernstr
 | 
			
		||||
// client.nearby({
 | 
			
		||||
// 	type: 'location',
 | 
			
		||||
// 	latitude: 52.5137344,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue