This projects provides a Java Client for the Escalators and Elevators API of the DB Station&Service AG, codenamed Dbeac.
The API is published in the frame of Aufzugs-API Contest.
The original API definition file can be found here:
SSTBT_REST-API_ADAM_1_contest_alpha.yaml
Add the following dependency to your project:
<dependency>
<groupId>org.hisrc.dbeac</groupId>
<artifactId>dbeac-client</artifactId>
<version>...</version>
</dependency>
API invocation:
https://adam.noncd.db.de/api/v1.0/facilities
Java code:
List<Facility> allFacilities = api.findFacilities(null, null);
API invocation:
https://adam.noncd.db.de/api/v1.0/facilities?type=ELEVATOR&state=ACTIVE
Java code:
List<Facility> findFacilities = api.findFacilities(
Arrays.asList(Facility.TypeEnum.ELEVATOR.toString()),
Arrays.asList(Facility.StateEnum.ACTIVE.toString()));
API invocation:
https://adam.noncd.db.de/api/v1.0/facilities/10110110
Java code:
Facility facility = api.getFacilityByEquipmentNumber(10110110L);
API invocation:
https://adam.noncd.db.de/api/v1.0/stations/3925
Java code:
Station station = api.findStationByStationNumber(3925L);