Skip to content

o7studios/octopus-sdk

Repository files navigation

Octopus SDK

Http client for the octopus backend.

Requirements:

  • Java 23
  • Running Octopus instance

Create HTTP Requests

Sync

OctopusApiClient client = new OctopusApiClient("https://o7.studio/octopus/api/v1"); //or local -> http://127.0.0.1:8080/api/v1
AttributeCreateRequest request = new AttributeCreateRequest(
        "ghosthouse", 
        "7501a26e-f139-41a6-a089-0a403148f58c", 
        "favourite_map", 
        "mansion", 
        null
);
ApiResult<AttributeResponse> response = client.createRoleAttribute(request);

response.code(); //HTTP response code
response.body(); //Body --> in this example: AttributeResponse

Async

OctopusAsyncApiClient asyncClient = new OctopusAsyncApiClient("https://o7.studio/octopus/api/v1"); //or local -> http://127.0.0.1:8080/api/v1
AttributeCreateRequest request = new AttributeCreateRequest(
        "ghosthouse",
        "7501a26e-f139-41a6-a089-0a403148f58c",
        "favourite_map",
        "mansion",
        null
);
asyncClient.createRoleAttributeAsync(request).thenAccept(response -> {
    response.code(); //HTTP response code
    response.body(); //Body --> in this example: AttributeResponse
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages