This is Java client HTTP REST API SDK for RPi Power Controller.
- Use official published artefacts, or ...
- Clone this git repository.
- Run
gradle clean build test publishToMavenLocal
to install this jar locally. - Use maven or gradle dependency below.
<dependency>
<groupId>one.microproject.rpi</groupId>
<artifactId>rpi-powercontroller-client</artifactId>
<version>1.4.2</version>
</dependency>
implementation 'one.microproject.rpi:rpi-powercontroller-client:1.4.2'
PowerControllerReadClient powerControllerReadClient = PowerControllerClientBuilder.builder()
.baseUrl("https://localhost:8090")
.withCredentials("client-001", "secret")
.buildReadClient();
powerControllerReadClient.getSystemInfo();
...
PowerControllerClient powerControllerClient = PowerControllerClientBuilder.builder()
.baseUrl("https://localhost:8090")
.withCredentials("client-001", "secret")
.build();
powerControllerClient.getSystemInfo();
powerControllerClient.getMeasurements();
...