mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
CMTA: enable feature flags, minor changes
This commit is contained in:
parent
77994bc5d1
commit
47a77d7dd2
3 changed files with 14 additions and 4 deletions
|
@ -27,6 +27,9 @@ client.journeys('000002370', '000005919', {results: 1, polylines: true})
|
|||
// const leg = journey.legs[0]
|
||||
// return client.trip(leg.id, leg.line.name, {polyline: true})
|
||||
// })
|
||||
// .then(([journey]) => {
|
||||
// return client.refreshJourney(journey.refreshToken, {stopovers: true, remarks: true})
|
||||
// })
|
||||
|
||||
.then((data) => {
|
||||
console.log(require('util').inspect(data, {depth: null}))
|
||||
|
|
|
@ -3,10 +3,16 @@
|
|||
const products = require('./products')
|
||||
|
||||
const transformReqBody = (body) => {
|
||||
body.client = {type: 'WEB', id: 'CMTA', name: 'webapp', l: ''}
|
||||
body.client = {
|
||||
type: 'WEB',
|
||||
id: 'CMTA',
|
||||
name: 'webapp',
|
||||
l: '' // todo: what is this?
|
||||
}
|
||||
body.ext = 'SBB.TZT.1'
|
||||
body.ver = '1.13'
|
||||
body.auth = {type: 'AID', aid: 'weblwemrcrlwemlcri'}
|
||||
// todo: `body.id = 'ztgcgxywk88bgm88'`
|
||||
|
||||
return body
|
||||
}
|
||||
|
@ -19,8 +25,9 @@ const cmtaProfile = {
|
|||
|
||||
products,
|
||||
|
||||
journeyLeg: true,
|
||||
radar: true
|
||||
trip: true,
|
||||
radar: true,
|
||||
refreshJourney: true
|
||||
}
|
||||
|
||||
module.exports = cmtaProfile
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# CMTA profile for `hafas-client`
|
||||
|
||||
[*Capital Metropolitan Transportation Authority (CMTA)*](https://en.wikipedia.org/wiki/Capital_Metropolitan_Transportation_Authority) or CapMetro is a public transportation provider serving [Austin, Texas](https://en.wikipedia.org/wiki/Austin,_Texas) metropolitan area. This profile adds *CMTA*-specific customizations to `hafas-client`.
|
||||
[*Capital Metropolitan Transportation Authority (CMTA)* or *CapMetro*](https://en.wikipedia.org/wiki/Capital_Metropolitan_Transportation_Authority) is a public transportation provider serving [Austin, Texas](https://en.wikipedia.org/wiki/Austin,_Texas) metropolitan area. This profile adds *CMTA*-specific customizations to `hafas-client`.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue