mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
Bayern: Enable more products for trips.
This commit is contained in:
parent
e43c676a34
commit
cfae3fc11c
2 changed files with 23 additions and 0 deletions
|
@ -140,7 +140,20 @@ public class BayernProvider extends AbstractEfaProvider
|
|||
final StringBuilder uri = new StringBuilder(super.xsltTripRequestParameters(from, via, to, time, dep, products, walkSpeed, accessibility,
|
||||
options));
|
||||
|
||||
if (products != null)
|
||||
{
|
||||
for (final Product p : products)
|
||||
{
|
||||
if (p == Product.HIGH_SPEED_TRAIN)
|
||||
uri.append("&inclMOT_15=on&inclMOT_16=on");
|
||||
|
||||
if (p == Product.REGIONAL_TRAIN)
|
||||
uri.append("&inclMOT_13=on");
|
||||
}
|
||||
}
|
||||
|
||||
uri.append("&inclMOT_11=on");
|
||||
uri.append("&inclMOT_14=on");
|
||||
|
||||
return uri.toString();
|
||||
}
|
||||
|
|
|
@ -188,4 +188,14 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
print(laterResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void tripRegensburg() throws Exception
|
||||
{
|
||||
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "4014051", "Regensburg", "Klenzestraße"), null, new Location(
|
||||
LocationType.STATION, "4014080", "Regensburg", "Universität"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
print(result);
|
||||
final QueryTripsResult laterResult = queryMoreTrips(result.context, true);
|
||||
print(laterResult);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue