PEKA VM Client is a Java library, that allows you to easily access data from REST API provided by Urban Transport Authority in Poznań (Zarząd Transportu Miejskiego w Poznaniu) for PEKA Virtual Monitor.
The library includes:
- stop points,
- bus and tram lines,
- real departure times based on current position of buses and trams,
- messages on current traffic incidents, etc.
REST API consumed by this library doesn't have any official documentation, but there is unofficial one, which is available here.
<dependency>
<groupId>com.github.adrmal</groupId>
<artifactId>peka-vm-client</artifactId>
<version>1.0.0</version>
</dependency>
List<StopPoint> stopPoints = Peka.getStopPoints("Most");
List<Bollard> bollards = Peka.getBollardsByStreet("Naramowicka");
List<DepartureTime> departureTimes = Peka.getTimesByBollard("GABA01");
The main class of the library is Peka
, which has following static methods:
List<StopPoint> getStopPoints(String stopPointPattern)
List<Bollard> getBollardsByStopPoint(String stopPointName)
List<Bollard> getBollardsByStreet(String streetName)
List<DirectionWithBollards> getDirectionsWithBollardsByLine(String lineNumber)
List<Line> getLines(String linePattern)
List<Street> getStreets(String streetPattern)
List<DepartureTime> getTimesByBollard(String bollardTag)
List<DepartureTime> getTimesByStopPoint(String stopPointName)
long getServerTime()
List<Message> getMessagesForBollard(String bollardTag)