A library to make simple interface to the Public Transport Victoria API in Java.
PTV has now shut down V2 API. Currently putting together V3 of the API from their Swagger.
- Departures
- route type + stop id
- route type + stop id + route id
- query parameters
- Directions
- route id
- direction id
- direction id + route type
- Disruptions
- view all
- route id
- route id + stop id
- stop id
- disruption id
- modes
- Outlets
- all
- lat + lon
- Patterns
- run id + route type
- Routes
- all
- route id
- query parameters
- Route Types
- all
- Runs
- route id
- route id + route type
- run id
- run id + route type
- Search
- search term
- Stops
- stop id + route type
- route id + route type
- lat + lon
Build is done by Gradle. ./gradlew build
in the root directory will do the job.
The jar is created in the default directory of build/libs/PTV-API.jar
.
To use this library will first need to obtain the developer ID and private key from PTV, here would be a good place to start I would say with that.
The artifacts are published to Bintray and can be obtained by your build tool of choice.
This was V2 API, V3 API will be documented once more has been completed
Once you've got these you can create a PtvRequest
object and that is all you
need to obtain the information from PTV. This will build your request and return
the JSON objects as Java bean classes. To determine which request you need
please refer to the PTV documentation and hopefully I have documented them well
enough to help.