DB: enable radar()

This commit is contained in:
Jannis R 2019-07-20 12:47:32 +02:00
parent 3aaa1496f5
commit 77afb9f9a3
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
3 changed files with 21 additions and 0 deletions

View file

@ -26,6 +26,12 @@ client.journeys('8011167', '8000261', {results: 1, tickets: true})
// when: new Date('2018-08-27T10:00:00+0200'), // when: new Date('2018-08-27T10:00:00+0200'),
// maxDuration: 50 // maxDuration: 50
// }) // })
// client.radar({
// north: 52.52411,
// west: 13.41002,
// south: 52.51942,
// east: 13.41709
// }, {results: 10})
.then((data) => { .then((data) => {
console.log(require('util').inspect(data, {depth: null, colors: true})) console.log(require('util').inspect(data, {depth: null, colors: true}))

View file

@ -388,6 +388,7 @@ const dbProfile = {
formatStation, formatStation,
trip: true, // todo: #49 trip: true, // todo: #49
radar: true,
reachableFrom: true reachableFrom: true
} }

View file

@ -376,6 +376,20 @@ test('line with additionalName', async (t) => {
t.end() 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) => { test('reachableFrom', async (t) => {
const torfstr17 = { const torfstr17 = {
type: 'location', type: 'location',