mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-11-04 01:56:33 +02:00 
			
		
		
		
	departures/arrivals: add results option
This commit is contained in:
		
							parent
							
								
									70c02199b2
								
							
						
					
					
						commit
						ae74bb420d
					
				
					 2 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -14,6 +14,9 @@ const formatStationBoardReq = (ctx, station, type) => {
 | 
			
		|||
		],
 | 
			
		||||
		dur: opt.duration
 | 
			
		||||
	}
 | 
			
		||||
	if (opt.results !== null) {
 | 
			
		||||
		req.maxJny = opt.results === Infinity ? 10000 : opt.results
 | 
			
		||||
	}
 | 
			
		||||
	if (profile.departuresGetPasslist) req.getPasslist = !!opt.stopovers
 | 
			
		||||
	if (profile.departuresStbFltrEquiv) req.stbFltrEquiv = !opt.includeRelatedStations
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								index.js
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								index.js
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -51,6 +51,7 @@ const createClient = (profile, userAgent, opt = {}) => {
 | 
			
		|||
			// todo: for arrivals(), this is actually a station it *has already* stopped by
 | 
			
		||||
			direction: null, // only show departures stopping by this station
 | 
			
		||||
			duration: 10, // show departures for the next n minutes
 | 
			
		||||
			results: 50, // max. number of results – `null` means "whatever HAFAS wants"
 | 
			
		||||
			linesOfStops: false, // parse & expose lines at the stop/station?
 | 
			
		||||
			remarks: true, // parse & expose hints & warnings?
 | 
			
		||||
			stopovers: false, // fetch & parse previous/next stopovers?
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue