profile flag for remarks()

This commit is contained in:
Jannis R 2020-09-16 17:21:59 +02:00 committed by Jannis Redmann
parent ed48971fb1
commit 731d9b8b81
16 changed files with 28 additions and 13 deletions

View file

@ -528,7 +528,6 @@ const createClient = (profile, userAgent, opt = {}) => {
locations, locations,
stop, stop,
nearby, nearby,
remarks,
serverInfo, serverInfo,
} }
if (profile.trip) client.trip = trip if (profile.trip) client.trip = trip
@ -536,6 +535,7 @@ const createClient = (profile, userAgent, opt = {}) => {
if (profile.refreshJourney) client.refreshJourney = refreshJourney if (profile.refreshJourney) client.refreshJourney = refreshJourney
if (profile.reachableFrom) client.reachableFrom = reachableFrom if (profile.reachableFrom) client.reachableFrom = reachableFrom
if (profile.tripsByName) client.tripsByName = tripsByName if (profile.tripsByName) client.tripsByName = tripsByName
if (profile.remarks !== false) client.remarks = remarks
Object.defineProperty(client, 'profile', {value: profile}) Object.defineProperty(client, 'profile', {value: profile})
return client return client
} }

View file

@ -26,8 +26,9 @@ const cflProfile = {
products: products, products: products,
trip: true, trip: true,
radar: true radar: true,
// todo: reachableFrom? // todo: reachableFrom?
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = cflProfile; module.exports = cflProfile;

View file

@ -26,7 +26,8 @@ const cmtaProfile = {
trip: true, trip: true,
radar: true, radar: true,
refreshJourney: true, refreshJourney: true,
reachableFrom: true reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = cmtaProfile module.exports = cmtaProfile

View file

@ -97,7 +97,8 @@ const dbBusradarNrwProfile = {
journeysOutFrwd: false, journeysOutFrwd: false,
trip: true, trip: true,
radar: true radar: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = dbBusradarNrwProfile module.exports = dbBusradarNrwProfile

View file

@ -471,7 +471,8 @@ const dbProfile = {
trip: true, // todo: #49 trip: true, // todo: #49
radar: true, radar: true,
reachableFrom: true reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = dbProfile module.exports = dbProfile

View file

@ -27,7 +27,8 @@ const hvvProfile = {
trip: true, trip: true,
radar: true, radar: true,
refreshJourney: true, refreshJourney: true,
reachableFrom: true reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = hvvProfile module.exports = hvvProfile

View file

@ -29,6 +29,7 @@ const insaProfile = {
radar: true, radar: true,
refreshJourney: false, refreshJourney: false,
reachableFrom: true, reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = insaProfile; module.exports = insaProfile;

View file

@ -32,7 +32,8 @@ const invgProfile = {
trip: true, trip: true,
radar: true, radar: true,
refreshJourney: true refreshJourney: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = invgProfile module.exports = invgProfile

View file

@ -92,7 +92,8 @@ const nahshProfile = {
trip: true, trip: true,
radar: true, // todo: see #34 radar: true, // todo: see #34
reachableFrom: true reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = nahshProfile module.exports = nahshProfile

View file

@ -32,7 +32,8 @@ const saarfahrplanProfile = {
departuresGetPasslist: true, departuresGetPasslist: true,
trip: true, trip: true,
radar: true, radar: true,
reachableFrom: true reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = saarfahrplanProfile module.exports = saarfahrplanProfile

View file

@ -73,7 +73,8 @@ const oebbProfile = {
trip: true, trip: true,
radar: true, radar: true,
reachableFrom: true reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = oebbProfile module.exports = oebbProfile

View file

@ -34,7 +34,8 @@ const pkpProfile = {
trip: true, trip: true,
radar: true, radar: true,
refreshJourney: false, refreshJourney: false,
reachableFrom: true reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = pkpProfile module.exports = pkpProfile

View file

@ -23,7 +23,8 @@ const hvvProfile = {
trip: true, trip: true,
radar: true, radar: true,
refreshJourney: true, refreshJourney: true,
reachableFrom: true reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = hvvProfile module.exports = hvvProfile

View file

@ -69,6 +69,7 @@ const sncbProfile = {
refreshJourney: true, refreshJourney: true,
radar: true, radar: true,
// todo: `reachableFrom: true` fails with `H9240` // todo: `reachableFrom: true` fails with `H9240`
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = sncbProfile module.exports = sncbProfile

View file

@ -122,7 +122,8 @@ const vbbProfile = {
journeysWalkingSpeed: true, journeysWalkingSpeed: true,
trip: true, trip: true,
radar: true, radar: true,
reachableFrom: true reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = vbbProfile module.exports = vbbProfile

View file

@ -30,6 +30,7 @@ const hvvProfile = {
reachableFrom: true, reachableFrom: true,
// fails with `CGI_READ_FAILED` // fails with `CGI_READ_FAILED`
// radar: true, // radar: true,
remarks: false, // seems like ver >= 1.20 is required
} }
module.exports = hvvProfile module.exports = hvvProfile