From efabfdba7e0add4ad4455b69276adaa8b889b632 Mon Sep 17 00:00:00 2001 From: dimitrisstaratzis Date: Thu, 6 Jun 2024 15:47:41 +0300 Subject: [PATCH 1/2] Do not expect ```v1``` when using a custom Host URL --- src/main/java/examples/Examples.java | 5 +++-- src/main/java/io/tiledb/cloud/TileDBLogin.java | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/examples/Examples.java b/src/main/java/examples/Examples.java index b576bfd..c08ae36 100644 --- a/src/main/java/examples/Examples.java +++ b/src/main/java/examples/Examples.java @@ -18,7 +18,7 @@ public class Examples { - public static void main(String[] args) { + public static void main(String[] args) throws ApiException { // if using cloud for the first time create the client with a Login object to pass your credentials. TileDBClient tileDBClient = new TileDBClient( @@ -27,7 +27,8 @@ public static void main(String[] args) { System.getenv("API_TOKEN"), true, true, - true)); + true, + "https://api.tiledb.com")); // If the "RememberME" option is set to true in your first login you can access TileDB-Cloud without the need // to pass any credentials from now on. Just create the client as follows: diff --git a/src/main/java/io/tiledb/cloud/TileDBLogin.java b/src/main/java/io/tiledb/cloud/TileDBLogin.java index 478a89c..5269d25 100644 --- a/src/main/java/io/tiledb/cloud/TileDBLogin.java +++ b/src/main/java/io/tiledb/cloud/TileDBLogin.java @@ -58,15 +58,13 @@ public TileDBLogin(String username, String password, String apiKey, boolean veri */ public TileDBLogin(String username, String password, String apiKey, boolean verifySSL, boolean rememberMe, boolean overwritePrevious, String host) throws ApiException { - if (host.equals("https://api.tiledb.com/v2")){ - throw new ApiException("https://api.tiledb.com/v2 is not yet supported"); - } + this.password = password; this.username = username; this.apiKey = apiKey; this.verifySSL = verifySSL; this.rememberMe = rememberMe; - this.host = host; + this.host = host + "/v1"; this.overwritePrevious = overwritePrevious; } From 0089cc91a9343e5130676d60f8f3d32e7a52948f Mon Sep 17 00:00:00 2001 From: dimitrisstaratzis Date: Fri, 7 Jun 2024 14:18:31 +0300 Subject: [PATCH 2/2] update build.gradle --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 36efb0a..e7d7496 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group 'io.tiledb' -version = '0.3.1-SNAPSHOT' +version = '0.3.2-SNAPSHOT' repositories { mavenCentral()