Stefan Kalscheuer 5152c4e667
All checks were successful
continuous-integration/drone/push Build is passing
docs: correct forStops() calls in README
backported from 591476cc6011210c01624214d7f57e099a48ea66
2022-11-21 15:32:05 +01:00
2022-08-30 12:42:18 +02:00
2017-05-14 10:37:32 +02:00
2020-05-09 18:37:46 +02:00
2016-12-27 17:44:36 +01:00

jURAclient

Build status Quality Gate Javadocs Maven Central License

Java client for URA based public transport APIs.

This client allows to simply connect any Java application to the public transport API to implement a monitor for the local bus station or any other custom queries. API versions 1.x and 2.x are supported.

Usage Examples

Initialization

// Instantiate the client (e.g. using the TFL API)
UraClient ura = new UraClient("http://countdown.api.tfl.gov.uk");

// Initialize the API with non-standard endpoints (e.g. ASEAG with API V2)
UraClient ura = new UraClient("http://ivu.aseag.de", 
                              "interfaces/ura/instant_V2", 
                              "interfaces/ura/stream_V2");

List Stops

// List ALL available stops
List<Stop> stops = ura.getStops();

// List available stops in a 200m radius around given coordinates
List<Stop> stops = ura.forPosition(51.51009, -0.1345734, 200)
                      .getStops();

Get Trips

// Get next 10 trips for given stops and lines in a single direction (all filters optional)
List<Trip> trips = ura.forStops("100000")
                      .forLines("25", "35")
                      .forDirection(1)
                      .getTrips(10);

// Get trips from given stop towards your destination
List<Trip> trips = ura.forStopsByName("Piccadilly Circus")
                      .towards("Marble Arch")
                      .getTrips();

Get Messages

// Get next 10 trips for given stops and lines in a single direction (all filters optional)
List<Message> msgs = ura.forStops("100000")
                        .getMessages();

Maven Artifact

<dependency>
    <groupId>de.stklcode.pubtrans</groupId>
    <artifactId>juraclient</artifactId>
    <version>1.3.2</version>
</dependency>

License

The project is licensed under Apache License 2.0.

Description
Java client for URA based public transport APIs
Readme 600 KiB
v2.0.9 Latest
2025-04-19 16:43:48 +00:00
Languages
Java 100%