mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-10-31 08:06:33 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			439 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
	
		
			439 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const formatTripReq = ({opt}, id) => {
 | |
| 	return {
 | |
| 		cfg: {polyEnc: 'GPA'},
 | |
| 		meth: 'JourneyDetails',
 | |
| 		req: {
 | |
| 			// todo: getTrainComposition
 | |
| 			jid: id,
 | |
| 			// HAFAS apparently ignores the date in the trip ID and uses the `date` field.
 | |
| 			// Thus, it will find a different trip if you pass the wrong date via `opt.when`.
 | |
| 			// date: profile.formatDate(profile, opt.when),
 | |
| 			getPolyline: !!opt.polyline
 | |
| 		}
 | |
| 	}
 | |
| }
 | |
| 
 | |
| export {
 | |
| 	formatTripReq,
 | |
| }
 |