ArtifactApi
Data Client Artifact API
It provides a way to store/consume artifacts. An artifact is the package which can contain code, assets, binary files, and configuration data. Artifacts are uniquely named, versioned, and immutable. Each artifact is identified by group ID, artifact ID and version.
For the full ArtifactApi specification, see ArtifactApi.
The following pages describe the per-request configuration and metrics.
Example
val client = BaseClient()
val artifactsApi = client.of[ArtifactsApi]
val someArtifactHrn = "hrn:here:artifact::olp-here-test:com.here.platform:cli:12.3.39"
val result = artifactsApi.getArtifact(someArtifactHrn).executeToEntity()
result
.andThen {
case Success(response: GetArtifactResponse) =>
// do something with the artifact
response.files.foreach(file => println(file.name))
case Failure(ex) =>
ex.printStackTrace()
}
Await.result(result, Duration.Inf)BaseClient client = BaseClientJava.instance();
ArtifactsApi artifactsApi = new ArtifactsApi(client);
String someArtifactHrn = "hrn:here:artifact::olp-here-test:com.here.platform:cli:12.3.39";
GetArtifactResponse getArtifactResponse =
artifactsApi.getArtifact(someArtifactHrn).executeToEntity().toCompletableFuture().join();
// do something with the artifact
getArtifactResponse.getFiles().forEach(file -> System.out.println(file.getName()));Updated 22 days ago