Skip to content

Latest commit

 

History

History

rpi-powercontroller-client

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Maven Central

Java client for RPi Power Controller

This is Java client HTTP REST API SDK for RPi Power Controller.

Use, Compile and Install

  • 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.

use with maven

<dependency>
    <groupId>one.microproject.rpi</groupId>
    <artifactId>rpi-powercontroller-client</artifactId>
    <version>1.4.2</version>
</dependency>

use with gradle

implementation 'one.microproject.rpi:rpi-powercontroller-client:1.4.2'

use in your java code

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();
...