mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-04-20 23:23:56 +03:00
DB: enable radar()
This commit is contained in:
parent
3aaa1496f5
commit
77afb9f9a3
3 changed files with 21 additions and 0 deletions
|
@ -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}))
|
||||
|
|
|
@ -388,6 +388,7 @@ const dbProfile = {
|
|||
formatStation,
|
||||
|
||||
trip: true, // todo: #49
|
||||
radar: true,
|
||||
reachableFrom: true
|
||||
}
|
||||
|
||||
|
|
14
test/db.js
14
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',
|
||||
|
|
Loading…
Add table
Reference in a new issue