Java implementation of the AtB Sanntids API
- Clone repository
- Build with
mvn install
- Add as a dependency to your project
<dependency>
<groupId>com.thord</groupId>
<artifactId>atb-api</artifactId>
<version>0.0.1</version>
</dependency>
To use the API you need credentials obtained from AtB
// Initialize a new instance of the API
AtB api = new AtB("<username>", "<password>", APIMode.SOAP);
// Get a list of all bus stops
BusStopsListResult stops = api.getBusStopsList();
// Get bus schedule for a stop matching the given id
RealTimeForecastByStopResult result = api.getUserRealTimeForecastByStop(<bus_stop_id>);