The official Java SDK for the WhereIsMyTransport API.
Access to the platform is completely free, so for more information and to get credentials, just visit the developer portal.
// Setup your credentials.
String clientId = "CLIENT_ID";
String clientSecret = "CLIENT_SECRET";
// Define the api client.
TransportApiClient defaultClient = new TransportApiClient(new TransportApiClientSettings(clientId, clientSecret));
// Make an api call.
TransportApiResult<List<Agency>> agencies = defaultClient.getAgencies(AgencyQueryOptions.defaultQueryOptions());
// Do fancy things with the results.
The following end-points are available:
- POST api/journeys
- GET api/journeys/{id}
- GET api/journeys/{id}/itineraries/{id}
- GET api/agencies
- GET api/agencies/{id}
- GET api/stops
- GET api/stops/{id}
- GET api/stops/{id}/timetables
- GET api/lines
- GET api/lines/{id}
- GET api/lines/{id}/timetables
- GET api/fareproducts
- GET api/fareproducts/{id}
Download the latest JAR or grab via Maven:
<dependency>
<groupId>com.whereismytransport.transportapisdk</groupId>
<artifactId>transportapisdk</artifactId>
<version>1.0.1</version>
</dependency>
or Gradle:
compile 'com.whereismytransport.transportapisdk:transportapisdk:1.0.1'
Chris King - https://twitter.com/crkingza
TransportApiSdk is available under the MIT license. See the LICENSE file for more info.