Class AdventureWebuiEditorAPI

java.lang.Object
dev.unnm3d.redischat.utils.AdventureWebuiEditorAPI

public final class AdventureWebuiEditorAPI extends Object
The adventure-webui editor API.
  • Constructor Details

    • AdventureWebuiEditorAPI

      public AdventureWebuiEditorAPI(String root)
      Creates a new instance of the editor API.
    • AdventureWebuiEditorAPI

      public AdventureWebuiEditorAPI(@NotNull @NotNull URI root, @NotNull @NotNull HttpClient client)
      Creates a new instance of the editor API with the given root URI and a client.
      Parameters:
      root - the root URI
      client - the client
  • Method Details

    • startSession

      @NotNull public @NotNull CompletableFuture<String> startSession(@NotNull @NotNull String input, @NotNull @NotNull String command, @NotNull @NotNull String application)
      Starts a session, returning the token.
      Parameters:
      input - the input
      command - the command
      application - the application name
      Returns:
      a completable future that will provide the token
    • retrieveSession

      @NotNull public @NotNull CompletableFuture<String> retrieveSession(@NotNull @NotNull String token)
      Retrieves the result of a session, given a token.
      Parameters:
      token - the token
      Returns:
      the resulting MiniMessage string in a completable future
    • getEditorUrl

      public String getEditorUrl(String token)