Skip to content

Commit 2952880

Browse files
committed
WIP
1 parent 944767b commit 2952880

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

rest-exe-example.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const TOKEN = process.env.TOKEN
66
if (!TOKEN) throw new Error('missing TOKEN env var')
77

88
const profile = {
9-
endpoint: 'https://dbrest-rt.hafas.de/openapi/1.23/'
9+
endpoint: 'https://demo.hafas.de/db-vendo/restproxy/'
1010
}
1111

1212
const {
@@ -23,9 +23,10 @@ const berlinSchönefeld = '8010109'
2323
const berlinWestkreuz = '8089047'
2424
const berlinMesseSüd = '8089328'
2525
const berlinYorckstrS1 = '8089051'
26+
const frankfurtHbf = '8000105'
2627
const somewhereInBerlin = {type: 'location', address: 'foo', latitude: 52.51072, longitude: 13.37793}
2728

28-
// journeys(berlinOstkreuz, '8000261', {
29+
// journeys('8000150', berlinOstkreuz, {
2930
// results: 3,
3031
// stopovers: true,
3132
// remarks: true
@@ -35,8 +36,9 @@ const somewhereInBerlin = {type: 'location', address: 'foo', latitude: 52.51072,
3536
// .then(trip)
3637
// .then(tripHistory)
3738
// tripAlternatives()
39+
// trip('1|406543|0|80|2122019')
3840

39-
locations('leopoldplatz ber')
41+
// locations('hanau hbf')
4042
// nearby({type: 'location', latitude: 52.4751309, longitude: 13.3656537})
4143
// departures(berlinYorckstrS1, {
4244
// remarks: true
@@ -54,7 +56,8 @@ locations('leopoldplatz ber')
5456
// remarks()
5557
// dataInfo()
5658

57-
.then(data => console.log(require('util').inspect(data, {depth: null, colors: true})))
59+
// .then(data => console.log(require('util').inspect(data, {depth: null, colors: true})))
60+
.then(data => console.log(JSON.stringify(data)))
5861
.catch((err) => {
5962
console.error(err)
6063
process.exit(1)

0 commit comments

Comments
 (0)