SDKs
Experimental
Java
Use the Loams Java SDK (dev.loams:loams) and make the first call.
The Java SDK runs on Java 17 or newer; its only runtime dependency is protobuf-java.
Experimental
dev.loams:loams 0.1.0 is on Maven Central. The SDK is experimental: its API can change
between releases, so pin the exact version.
Examples: github.com/ostrium-labs/loams-java · Source: sdks/java
Install
From Maven Central:
implementation("dev.loams:loams:0.1.0") // Gradle<dependency>
<groupId>dev.loams</groupId>
<artifactId>loams</artifactId>
<version>0.1.0</version>
</dependency>Quickstart
Client client = Client.builder()
.endpoint("http://127.0.0.1:8080")
.auth(TokenSources.apiKey(System.getenv("LOAMS_API_KEY")))
.build();
GetInstanceResponse info = client.instance().getInstance(GetInstanceRequest.getDefaultInstance());
System.out.println(info.getName());
if (client.system().guard("live") == null) {
// this build serves Loams Live
}Build and test
cd sdks/java
./build.sh # fetch dependencies, compile, run the suite