mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 23:29:35 +02:00
INSA: v1.21, enable reachableFrom()
This commit is contained in:
parent
b653d4659b
commit
1b03b2eb0f
2 changed files with 13 additions and 9 deletions
|
@ -5,6 +5,13 @@ const insaProfile = require('.')
|
||||||
|
|
||||||
const client = createClient(insaProfile, 'hafas-client-example')
|
const client = createClient(insaProfile, 'hafas-client-example')
|
||||||
|
|
||||||
|
const hellestr1 = {
|
||||||
|
type: 'location',
|
||||||
|
id: '980801263',
|
||||||
|
address: 'Magdeburg - Leipziger Straße, Hellestraße 1',
|
||||||
|
latitude: 52.116706, longitude: 11.621821
|
||||||
|
}
|
||||||
|
|
||||||
// from Magdeburg-Neustadt to Magdeburg-Buckau
|
// from Magdeburg-Neustadt to Magdeburg-Buckau
|
||||||
client.journeys('008010226', '008013456', {results: 1})
|
client.journeys('008010226', '008013456', {results: 1})
|
||||||
// client.departures('008010226', { duration: 5 })
|
// client.departures('008010226', { duration: 5 })
|
||||||
|
@ -12,17 +19,14 @@ client.journeys('008010226', '008013456', {results: 1})
|
||||||
// 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.stop('008010226') // Magdeburg-Neustadt
|
// client.stop('008010226') // Magdeburg-Neustadt
|
||||||
// client.nearby({
|
// client.nearby(hellestr1)
|
||||||
// type: 'location',
|
|
||||||
// latitude: 52.148842,
|
|
||||||
// longitude: 11.641705
|
|
||||||
// }, {distance: 200})
|
|
||||||
// client.radar({
|
// client.radar({
|
||||||
// north: 52.148364,
|
// north: 52.148364,
|
||||||
// west: 11.600826,
|
// west: 11.600826,
|
||||||
// south: 52.108486,
|
// south: 52.108486,
|
||||||
// east: 11.651451
|
// east: 11.651451
|
||||||
// }, {results: 10})
|
// }, {results: 10})
|
||||||
|
// client.reachableFrom(hellestr1, {maxDuration: 10})
|
||||||
|
|
||||||
// .then(({journeys}) => {
|
// .then(({journeys}) => {
|
||||||
// const [journey] = journeys
|
// const [journey] = journeys
|
||||||
|
|
|
@ -10,8 +10,8 @@ const transformReqBody = (ctx, body) => {
|
||||||
name: 'nasaPROD',
|
name: 'nasaPROD',
|
||||||
os: 'iPhone OS 11.2.5'
|
os: 'iPhone OS 11.2.5'
|
||||||
}
|
}
|
||||||
body.ver = '1.11'
|
body.ver = '1.21'
|
||||||
body.auth = {aid: "nasa-apps"}
|
body.auth = {type: 'AID', aid: "nasa-apps"}
|
||||||
body.lang = 'en' // todo: `de`?
|
body.lang = 'en' // todo: `de`?
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
@ -27,8 +27,8 @@ const insaProfile = {
|
||||||
|
|
||||||
trip: true,
|
trip: true,
|
||||||
radar: true,
|
radar: true,
|
||||||
refreshJourney: false
|
refreshJourney: false,
|
||||||
// todo: upgrade to version `1.13` in order to enable `reachableFrom: true`
|
reachableFrom: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = insaProfile;
|
module.exports = insaProfile;
|
||||||
|
|
Loading…
Add table
Reference in a new issue