mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-10-31 16:16:32 +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]
 | // 	const leg = journey.legs[0]
 | ||||||
| // 	return client.trip(leg.id, leg.line.name, {polyline: true})
 | // 	return client.trip(leg.id, leg.line.name, {polyline: true})
 | ||||||
| // })
 | // })
 | ||||||
|  | // .then(([journey]) => {
 | ||||||
|  | // 	return client.refreshJourney(journey.refreshToken, {stopovers: true, remarks: true})
 | ||||||
|  | // })
 | ||||||
| 
 | 
 | ||||||
| .then((data) => { | .then((data) => { | ||||||
| 	console.log(require('util').inspect(data, {depth: null})) | 	console.log(require('util').inspect(data, {depth: null})) | ||||||
|  |  | ||||||
|  | @ -3,10 +3,16 @@ | ||||||
| const products = require('./products') | const products = require('./products') | ||||||
| 
 | 
 | ||||||
| const transformReqBody = (body) => { | 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.ext = 'SBB.TZT.1' | ||||||
| 	body.ver = '1.13' | 	body.ver = '1.13' | ||||||
| 	body.auth = {type: 'AID', aid: 'weblwemrcrlwemlcri'} | 	body.auth = {type: 'AID', aid: 'weblwemrcrlwemlcri'} | ||||||
|  | 	// todo: `body.id = 'ztgcgxywk88bgm88'`
 | ||||||
| 
 | 
 | ||||||
| 	return body | 	return body | ||||||
| } | } | ||||||
|  | @ -19,8 +25,9 @@ const cmtaProfile = { | ||||||
| 
 | 
 | ||||||
| 	products, | 	products, | ||||||
| 
 | 
 | ||||||
| 	journeyLeg: true, | 	trip: true, | ||||||
| 	radar: true | 	radar: true, | ||||||
|  | 	refreshJourney: true | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| module.exports = cmtaProfile | module.exports = cmtaProfile | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| # CMTA profile for `hafas-client` | # 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 | ## Usage | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue