diff --git a/p/db/example.js b/p/db/example.js index 93977b69..ce12163d 100644 --- a/p/db/example.js +++ b/p/db/example.js @@ -26,6 +26,12 @@ client.journeys('8011167', '8000261', {results: 1, tickets: true}) // when: new Date('2018-08-27T10:00:00+0200'), // maxDuration: 50 // }) +// client.radar({ +// north: 52.52411, +// west: 13.41002, +// south: 52.51942, +// east: 13.41709 +// }, {results: 10}) .then((data) => { console.log(require('util').inspect(data, {depth: null, colors: true})) diff --git a/p/db/index.js b/p/db/index.js index a61f3b83..66731693 100644 --- a/p/db/index.js +++ b/p/db/index.js @@ -388,6 +388,7 @@ const dbProfile = { formatStation, trip: true, // todo: #49 + radar: true, reachableFrom: true } diff --git a/test/db.js b/test/db.js index 9afc6f44..72d85202 100644 --- a/test/db.js +++ b/test/db.js @@ -376,6 +376,20 @@ test('line with additionalName', async (t) => { t.end() }) +test.skip('radar', async (t) => { + const vehicles = await client.radar({ + north: 52.52411, + west: 13.41002, + south: 52.51942, + east: 13.41709 + }, { + duration: 5 * 60, when + }) + + validate(t, vehicles, 'movements', 'vehicles') + t.end() +}) + test('reachableFrom', async (t) => { const torfstr17 = { type: 'location',