mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 08:19:51 +00:00
BVG: Update API base.
This commit is contained in:
parent
7b92f6ed18
commit
910b6705b8
2 changed files with 10 additions and 4 deletions
|
@ -36,7 +36,7 @@ import de.schildbach.pte.dto.Style.Shape;
|
||||||
*/
|
*/
|
||||||
public final class BvgProvider extends AbstractHafasProvider
|
public final class BvgProvider extends AbstractHafasProvider
|
||||||
{
|
{
|
||||||
private static final String API_BASE = "https://fahrinfo.bvg.de/Fahrinfo/bin/";
|
private static final String API_BASE = "http://bvg-apps.hafas.de/bin/";
|
||||||
private static final Product[] PRODUCTS_MAP = { Product.SUBURBAN_TRAIN, Product.SUBWAY, Product.TRAM, Product.BUS, Product.FERRY,
|
private static final Product[] PRODUCTS_MAP = { Product.SUBURBAN_TRAIN, Product.SUBWAY, Product.TRAM, Product.BUS, Product.FERRY,
|
||||||
Product.HIGH_SPEED_TRAIN, Product.REGIONAL_TRAIN, Product.ON_DEMAND };
|
Product.HIGH_SPEED_TRAIN, Product.REGIONAL_TRAIN, Product.ON_DEMAND };
|
||||||
|
|
||||||
|
@ -44,9 +44,6 @@ public final class BvgProvider extends AbstractHafasProvider
|
||||||
{
|
{
|
||||||
super(NetworkId.BVG, API_BASE, "dn", PRODUCTS_MAP);
|
super(NetworkId.BVG, API_BASE, "dn", PRODUCTS_MAP);
|
||||||
|
|
||||||
setStationBoardEndpoint("http://bvg.hafas.de/bin/stboard.exe/dn");
|
|
||||||
setGetStopEndpoint(API_BASE + "ajax-getstop.bin/dn");
|
|
||||||
setQueryEndpoint(API_BASE + "query.bin/dn");
|
|
||||||
setJsonGetStopsUseWeight(false);
|
setJsonGetStopsUseWeight(false);
|
||||||
setJsonGetStopsEncoding(Charsets.UTF_8);
|
setJsonGetStopsEncoding(Charsets.UTF_8);
|
||||||
setJsonNearbyLocationsEncoding(Charsets.UTF_8);
|
setJsonNearbyLocationsEncoding(Charsets.UTF_8);
|
||||||
|
|
|
@ -158,6 +158,15 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest
|
||||||
print(later3Result);
|
print(later3Result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void tripBetweenStations() throws Exception
|
||||||
|
{
|
||||||
|
final QueryTripsResult result = queryTrips(new Location(LocationType.STATION, "9055101", 52496176, 13343273, null, "U Viktoria-Luise-Platz"),
|
||||||
|
null, new Location(LocationType.STATION, "9089303", 52588810, 13288699, null, "S Tegel"), new Date(), true, Product.ALL,
|
||||||
|
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||||
|
print(result);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shortViaTrip() throws Exception
|
public void shortViaTrip() throws Exception
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue