mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 17:39:49 +00:00
Adapt to API change of Sydney (New South Wales)
This commit is contained in:
parent
def50afd7b
commit
5f45e84a4b
2 changed files with 11 additions and 3 deletions
|
@ -25,7 +25,7 @@ import java.util.TimeZone;
|
|||
public class SydneyProvider extends AbstractEfaProvider
|
||||
{
|
||||
public static final NetworkId NETWORK_ID = NetworkId.SYDNEY;
|
||||
private final static String API_BASE = "http://mobile.131500.com.au/TripPlanner/mobile/";
|
||||
private final static String API_BASE = "http://tp.transportnsw.info/nsw/";
|
||||
|
||||
public SydneyProvider()
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ public class SydneyProviderLiveTest extends AbstractProviderLiveTest
|
|||
@Test
|
||||
public void nearbyStations() throws Exception
|
||||
{
|
||||
final NearbyStationsResult result = provider.queryNearbyStations(new Location(LocationType.STATION, 10101452), 0, 0);
|
||||
final NearbyStationsResult result = provider.queryNearbyStations(new Location(LocationType.STATION, 10101101), 0, 0);
|
||||
|
||||
print(result);
|
||||
}
|
||||
|
@ -64,11 +64,19 @@ public class SydneyProviderLiveTest extends AbstractProviderLiveTest
|
|||
@Test
|
||||
public void queryDepartures() throws Exception
|
||||
{
|
||||
final QueryDeparturesResult result = provider.queryDepartures(10101452, 0, false);
|
||||
final QueryDeparturesResult result = provider.queryDepartures(10101101, 0, false);
|
||||
|
||||
print(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autocomplete() throws Exception
|
||||
{
|
||||
final List<Location> autocompletes = provider.autocompleteStations("Town Hall Station");
|
||||
|
||||
print(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autocompleteIncomplete() throws Exception
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue