adapt docs & examples to bad0af8 📝

This commit is contained in:
Jannis R 2018-11-21 19:54:59 +01:00
parent bad0af8e25
commit 8b87868fba
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
10 changed files with 14 additions and 14 deletions

View file

@ -6,7 +6,7 @@
- [`departures(station, [opt])`](departures.md) query the next departures at a station - [`departures(station, [opt])`](departures.md) query the next departures at a station
- [`arrivals(station, [opt])`](arrivals.md) query the next arrivals 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 - [`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 - [`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 - [`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 - [`reachableFrom(address, [opt])`](reachable-from.md)  get all stations reachable from an address within `n` minutes

View file

@ -1,12 +1,12 @@
# `station(id, [opt])` # `stop(id, [opt])`
`id` must be in one of these formats: `id` must be in one of these formats:
```js ```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' '900000123456'
// an FPTF `station` object // an FPTF `stop`/`station` object
{ {
type: 'station', type: 'station',
id: '900000123456', id: '900000123456',
@ -23,7 +23,7 @@ With `opt`, you can override the default options, which look like this:
```js ```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 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') const client = createClient(vbbProfile, 'my-awesome-program')
client.station('900000042101') // U Spichernstr. client.stop('900000042101') // U Spichernstr.
.then(console.log) .then(console.log)
.catch(console.error) .catch(console.error)
``` ```

View file

@ -10,7 +10,7 @@ client.journeys('900000003201', '900000024101', {results: 1, polylines: true})
// client.departures('900000013102', {duration: 1}) // client.departures('900000013102', {duration: 1})
// client.arrivals('900000013102', {duration: 10, stationLines: true}) // client.arrivals('900000013102', {duration: 10, stationLines: true})
// client.locations('Alexanderplatz', {results: 2}) // client.locations('Alexanderplatz', {results: 2})
// client.station('900000042101', {stationLines: true}) // Spichernstr // client.stop('900000042101', {stationLines: true}) // Spichernstr
// client.nearby({ // client.nearby({
// type: 'location', // type: 'location',
// latitude: 52.5137344, // latitude: 52.5137344,

View file

@ -10,7 +10,7 @@ client.journeys('000002370', '000005919', {results: 1, polylines: true})
// client.departures('000002370', {duration: 1}) // client.departures('000002370', {duration: 1})
// client.arrivals('000002370', {duration: 10, stationLines: true}) // client.arrivals('000002370', {duration: 10, stationLines: true})
// client.locations('Westgate', {results: 2}) // client.locations('Westgate', {results: 2})
// client.station('000005534') // Downtown light rail station // client.stop('000005534') // Downtown light rail station
// client.nearby({ // client.nearby({
// type: 'location', // type: 'location',
// latitude: 30.266222, // latitude: 30.266222,

View file

@ -11,7 +11,7 @@ client.journeys('8011167', '8000261', {results: 1, tickets: true})
// client.arrivals('8011167', {duration: 10, stationLines: true}) // client.arrivals('8011167', {duration: 10, stationLines: true})
// client.locations('Berlin Jungfernheide') // client.locations('Berlin Jungfernheide')
// client.locations('Atze Musiktheater', {poi: true, addressses: false, fuzzy: false}) // client.locations('Atze Musiktheater', {poi: true, addressses: false, fuzzy: false})
// client.station('8000309') // Regensburg Hbf // client.stop('8000309') // Regensburg Hbf
// client.nearby({ // client.nearby({
// type: 'location', // type: 'location',
// latitude: 52.4751309, // latitude: 52.4751309,

View file

@ -11,7 +11,7 @@ client.journeys('008010226', '008013456', {results: 1})
// client.arrivals('8010226', {duration: 10, stationLines: true}) // client.arrivals('8010226', {duration: 10, stationLines: true})
// client.locations('Magdeburg Hbf', {results: 2}) // client.locations('Magdeburg Hbf', {results: 2})
// client.locations('Kunstmuseum Kloster Unser Lieben Frauen Magdeburg', {results: 2}) // client.locations('Kunstmuseum Kloster Unser Lieben Frauen Magdeburg', {results: 2})
// client.station('008010226') // Magdeburg-Neustadt // client.stop('008010226') // Magdeburg-Neustadt
// client.nearby({ // client.nearby({
// type: 'location', // type: 'location',
// latitude: 52.148842, // latitude: 52.148842,

View file

@ -11,7 +11,7 @@ client.journeys('8000103', '8000199', {results: 10, tickets: true})
// client.arrivals('8000199', {duration: 5, stationLines: true}) // client.arrivals('8000199', {duration: 5, stationLines: true})
// client.trip('1|30161|5|100|14032018', 'Bus 52') // client.trip('1|30161|5|100|14032018', 'Bus 52')
// client.locations('Schleswig', {results: 1}) // client.locations('Schleswig', {results: 1})
// client.station('706990') // Kiel Holunderbusch // client.stop('706990') // Kiel Holunderbusch
// client.nearby({ // client.nearby({
// type: 'location', // type: 'location',
// latitude: 54.295691, // latitude: 54.295691,

View file

@ -10,7 +10,7 @@ client.journeys('1291501', '8100002', {results: 1})
// client.departures('8100002', {duration: 1}) // client.departures('8100002', {duration: 1})
// client.arrivals('8100002', {duration: 10, stationLines: true}) // client.arrivals('8100002', {duration: 10, stationLines: true})
// client.locations('Salzburg', {results: 2}) // client.locations('Salzburg', {results: 2})
// client.station('8100173') // Graz Hbf // client.stop('8100173') // Graz Hbf
// client.nearby({ // client.nearby({
// type: 'location', // type: 'location',
// latitude: 47.812851, // latitude: 47.812851,

View file

@ -10,7 +10,7 @@ const client = createClient(vbbProfile, 'hafas-client-example')
client.departures('8004154', {duration: 5}) client.departures('8004154', {duration: 5})
// client.arrivals('8004154', {duration: 10, stationLines: true}) // client.arrivals('8004154', {duration: 10, stationLines: true})
// client.locations('mittersendling', {results: 5}) // client.locations('mittersendling', {results: 5})
// client.station('8004154', {stationLines: true}) // Mittersendling // client.stop('8004154', {stationLines: true}) // Mittersendling
// client.nearby({ // client.nearby({
// type: 'location', // type: 'location',
// latitude: 48.153858, // latitude: 48.153858,

View file

@ -10,7 +10,7 @@ client.journeys('900000003201', '900000024101', {results: 1, polylines: true})
// client.departures('900000013102', {duration: 1}) // client.departures('900000013102', {duration: 1})
// client.arrivals('900000013102', {duration: 10, stationLines: true}) // client.arrivals('900000013102', {duration: 10, stationLines: true})
// client.locations('Alexanderplatz', {results: 2}) // client.locations('Alexanderplatz', {results: 2})
// client.station('900000042101', {stationLines: true}) // Spichernstr // client.stop('900000042101', {stationLines: true}) // Spichernstr
// client.nearby({ // client.nearby({
// type: 'location', // type: 'location',
// latitude: 52.5137344, // latitude: 52.5137344,