mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
Hafas endpoints
This commit is contained in:
parent
6f2b4515d9
commit
4a7743d094
25 changed files with 130 additions and 171 deletions
|
@ -52,7 +52,7 @@ public class SeptaProvider extends AbstractHafasProvider
|
|||
|
||||
public SeptaProvider()
|
||||
{
|
||||
super(API_BASE + "query.exe/en", 4, null);
|
||||
super(API_BASE + "stboard.exe/en", API_BASE + "ajax-getstop.exe/dny", API_BASE + "query.exe/en", 4, null);
|
||||
}
|
||||
|
||||
public NetworkId id()
|
||||
|
@ -120,11 +120,10 @@ public class SeptaProvider extends AbstractHafasProvider
|
|||
|
||||
public NearbyStationsResult queryNearbyStations(final Location location, final int maxDistance, final int maxStations) throws IOException
|
||||
{
|
||||
final StringBuilder uri = new StringBuilder(API_BASE);
|
||||
|
||||
if (location.type == LocationType.STATION && location.hasId())
|
||||
{
|
||||
uri.append("stboard.exe/en?near=Anzeigen");
|
||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
||||
uri.append("?near=Anzeigen");
|
||||
uri.append("&distance=").append(maxDistance != 0 ? maxDistance / 1000 : 50);
|
||||
uri.append("&input=").append(location.id);
|
||||
|
||||
|
@ -140,8 +139,7 @@ public class SeptaProvider extends AbstractHafasProvider
|
|||
{
|
||||
final Calendar now = new GregorianCalendar(timeZone());
|
||||
|
||||
final StringBuilder uri = new StringBuilder();
|
||||
uri.append(API_BASE).append("stboard.exe/en");
|
||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
||||
uri.append("?input=").append(stationId);
|
||||
uri.append("&boardType=dep");
|
||||
uri.append("&time=");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue