Interface ApiClient
- All Known Implementing Classes:
ApiClient
public interface ApiClient
Arkitektonika REST client
-
Method Summary
Modifier and TypeMethodDescriptioncheckCompatibility(@NotNull ExecutorService executorService)Check if the specified API address is compatible with the clientcheckStatus(@NotNull String key, @NotNull ExecutorService executorService)Check the status of a remote schematicdelete(@NotNull String key, @NotNull ExecutorService executorService)Attempt to delete a schematic from the remote servicedownload(@NotNull String key, @NotNull ExecutorService executorService)Attempt to download a schematic from the remote serviceGet the API version supported by this clientupload(@NotNull File file, @NotNull ExecutorService executorService)Upload a schematic via an input stream
-
Method Details
-
getApiVersion
Get the API version supported by this client- Returns:
- API version
-
checkCompatibility
@NotNull @NotNull CompletableFuture<Boolean> checkCompatibility(@NotNull @NotNull ExecutorService executorService)Check if the specified API address is compatible with the client- Parameters:
executorService- Executor service used to complete the request- Returns:
- Future that completes with the result of the query
-
upload
@NotNull @NotNull CompletableFuture<SchematicKeys> upload(@NotNull @NotNull File file, @NotNull @NotNull ExecutorService executorService)Upload a schematic via an input stream- Parameters:
file- File to uploadexecutorService- Executor service used to complete the request- Returns:
- Future that completes with the access and deletion keys of the uploaded resource, or fails with an exception
-
checkStatus
@NotNull @NotNull CompletableFuture<ResourceStatus> checkStatus(@NotNull @NotNull String key, @NotNull @NotNull ExecutorService executorService)Check the status of a remote schematic- Parameters:
key- Schematic access keyexecutorService- Executor service used to complete the request- Returns:
- Future that completes with the resource status
-
delete
@NotNull @NotNull CompletableFuture<Boolean> delete(@NotNull @NotNull String key, @NotNull @NotNull ExecutorService executorService)Attempt to delete a schematic from the remote service- Parameters:
key- Deletion keyexecutorService- Executor service used to complete the request- Returns:
- Future that completes with the result
-
download
@NotNull @NotNull CompletableFuture<Schematic> download(@NotNull @NotNull String key, @NotNull @NotNull ExecutorService executorService)Attempt to download a schematic from the remote service- Parameters:
key- Download keyexecutorService- Executor service used to complete the request- Returns:
- Future that completes with the result
-