This is a client SDK for interacting with the vampire-squid microservice. It's mostly auto-generated using Kiota.
<dependency>
<groupId>org.mbari.vars</groupId>
<artifactId>vampire-squid-java-sdk</artifactId>
<version>0.0.1</version>
</dependency>var baseUrl = "http://localhost/vam/v1" // Substitute yoru services URL
var apiKey = "foobar" // Substitute your services API KEY
// -- Kiota API
var vampireSquid = VampireSquidFactory.create(baseUrl, apiKey)
// Use the service! Some examples.
List<String> cameraIds = vampireSquid.v1()
.videosequences()
.cameras()
.get();
// -- MediaService API
var mediaService = new VampireSquidKiotaClient(URI.create(baseUrl), apiKey);
List<String> cameraIds = mediaService.findAllCameraIds();- Copy the open api yaml file into each project's src/main/resources folder as docs.yaml
- Some may need the openapi version changed to 3.0.0 as kiota does not support 3.1.0
- Remove the
format: binaryfrom all sha512 blocks. Kiota assumes it's base64 encoded but we actually have been encoding as hex. This change will make Kiota treat them as strings:
sha512:
type: string
#format: binary # kiota will generat- Run the following command in the project's root directory
kiota generate -l java -c VampireSquid -n org.mbari.vars.vampiresquid.sdk.kiota -d ./src/main/resources/docs.yaml -o ./src/main/java/org/mbari/vars/vampiresquid/sdk/kiota --exclude-backward-compatible