Skip to content

Commit 40210af

Browse files
Do not expect v1 when using a custom Host URL
1 parent 3a6a37d commit 40210af

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/main/java/examples/Examples.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
public class Examples
2020
{
21-
public static void main(String[] args) {
21+
public static void main(String[] args) throws ApiException {
2222

2323
// if using cloud for the first time create the client with a Login object to pass your credentials.
2424
TileDBClient tileDBClient = new TileDBClient(
@@ -27,7 +27,8 @@ public static void main(String[] args) {
2727
System.getenv("API_TOKEN"),
2828
true,
2929
true,
30-
true));
30+
true,
31+
"https://api.tiledb.com"));
3132

3233
// If the "RememberME" option is set to true in your first login you can access TileDB-Cloud without the need
3334
// to pass any credentials from now on. Just create the client as follows:

src/main/java/io/tiledb/cloud/TileDBLogin.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,13 @@ public TileDBLogin(String username, String password, String apiKey, boolean veri
5858
*/
5959
public TileDBLogin(String username, String password, String apiKey, boolean verifySSL,
6060
boolean rememberMe, boolean overwritePrevious, String host) throws ApiException {
61-
if (host.equals("https://api.tiledb.com/v2")){
62-
throw new ApiException("https://api.tiledb.com/v2 is not yet supported");
63-
}
61+
6462
this.password = password;
6563
this.username = username;
6664
this.apiKey = apiKey;
6765
this.verifySSL = verifySSL;
6866
this.rememberMe = rememberMe;
69-
this.host = host;
67+
this.host = host + "/v1";
7068
this.overwritePrevious = overwritePrevious;
7169
}
7270

0 commit comments

Comments
 (0)