mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
correction: rename 'modes' to 'products'
This commit is contained in:
parent
4d4412d63f
commit
de4399fd43
2 changed files with 30 additions and 30 deletions
|
@ -6,7 +6,7 @@
|
|||
const createParseBitmask = require('../../parse/products-bitmask')
|
||||
const createFormatBitmask = require('../../format/products-bitmask')
|
||||
|
||||
const modes = require('./modes')
|
||||
const products = require('./products')
|
||||
|
||||
const transformReqBody = (body) => {
|
||||
body.client = {type: 'IPA', id: 'OEBB'}
|
||||
|
@ -24,11 +24,11 @@ const oebbProfile = {
|
|||
endpoint: 'http://fahrplan.oebb.at/bin/mgate.exe',
|
||||
transformReqBody,
|
||||
|
||||
products: modes.allProducts,
|
||||
products: products.allProducts,
|
||||
|
||||
parseProducts: createParseBitmask(modes.bitmasks),
|
||||
parseProducts: createParseBitmask(products.bitmasks),
|
||||
|
||||
formatProducts: createFormatBitmask(modes)
|
||||
formatProducts: createFormatBitmask(products)
|
||||
}
|
||||
|
||||
module.exports = oebbProfile
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const m = {
|
||||
const p = {
|
||||
nationalExp: {
|
||||
bitmask: 1,
|
||||
name: 'InterCityExpress & RailJet',
|
||||
|
@ -79,31 +79,31 @@ const m = {
|
|||
}
|
||||
}
|
||||
|
||||
m.bitmasks = []
|
||||
m.bitmasks[1] = m.nationalExp
|
||||
m.bitmasks[2] = m.national
|
||||
m.bitmasks[4] = m.national
|
||||
m.bitmasks[8] = m.interregional
|
||||
m.bitmasks[16] = m.regional
|
||||
m.bitmasks[32] = m.suburban
|
||||
m.bitmasks[64] = m.bus
|
||||
m.bitmasks[128] = m.ferry
|
||||
m.bitmasks[256] = m.subway
|
||||
m.bitmasks[512] = m.tram
|
||||
m.bitmasks[2048] = m.onCall
|
||||
m.bitmasks[4096] = m.interregional
|
||||
p.bitmasks = []
|
||||
p.bitmasks[1] = p.nationalExp
|
||||
p.bitmasks[2] = p.national
|
||||
p.bitmasks[4] = p.national
|
||||
p.bitmasks[8] = p.interregional
|
||||
p.bitmasks[16] = p.regional
|
||||
p.bitmasks[32] = p.suburban
|
||||
p.bitmasks[64] = p.bus
|
||||
p.bitmasks[128] = p.ferry
|
||||
p.bitmasks[256] = p.subway
|
||||
p.bitmasks[512] = p.tram
|
||||
p.bitmasks[2048] = p.onCall
|
||||
p.bitmasks[4096] = p.interregional
|
||||
|
||||
m.allProducts = [
|
||||
m.nationalExp,
|
||||
m.national,
|
||||
m.interregional,
|
||||
m.regional,
|
||||
m.suburban,
|
||||
m.bus,
|
||||
m.ferry,
|
||||
m.subway,
|
||||
m.tram,
|
||||
m.onCall
|
||||
p.allProducts = [
|
||||
p.nationalExp,
|
||||
p.national,
|
||||
p.interregional,
|
||||
p.regional,
|
||||
p.suburban,
|
||||
p.bus,
|
||||
p.ferry,
|
||||
p.subway,
|
||||
p.tram,
|
||||
p.onCall
|
||||
]
|
||||
|
||||
module.exports = m
|
||||
module.exports = p
|
Loading…
Add table
Reference in a new issue