データクライアントが API を参照しています

API キー またはベアラートークンを使用してアーティファクトファイルを消費する方法を提供します。

ReferencesApi のすべての仕様について は、 ReferencesApi を参照してください。

次のページで は、リクエストごとの設定メトリックについて説明します。

Scala
Java
val client = BaseClient()
val referencesApi = client.of[ReferencesApi]

val someArtifactHrn =
  "hrn:here:artifact::olp-here-test:com.here.platform:cli:12.3.39"
val filename = "cli-12.3.39.jar.sha1"
val apiKey = "<apiKey>"
val result = referencesApi
  .downloadArtifactFileByReference(someArtifactHrn, filename, Some(apiKey))
  .executeToBytes()

result
  .andThen {
    case Success(fileBytes: Array[Byte]) =>
      // do something with the content of file
      println(new String(fileBytes))
    case Failure(ex) =>
      ex.printStackTrace()
  }

Await.result(result, Duration.Inf)
BaseClient client = BaseClientJava.instance();
ReferencesApi referencesApi = new ReferencesApi(client);

String someArtifactHrn = "hrn:here:artifact::olp-here-test:com.here.platform:cli:12.3.39";
String filename = "cli-12.3.39.jar.sha1";
String apiKey = "<apiKey>";
byte[] fileBytes =
    referencesApi
        .downloadArtifactFileByReference(someArtifactHrn, filename, Optional.of(apiKey))
        .executeToBytes()
        .toCompletableFuture()
        .join();

// do something with the file content
System.out.println(new String(fileBytes));

」に一致する結果は 件です

    」に一致する結果はありません