diff --git a/javadoc/allclasses-index.html b/javadoc/allclasses-index.html index 58defca5cd0..d08cf78ac77 100644 --- a/javadoc/allclasses-index.html +++ b/javadoc/allclasses-index.html @@ -12611,7 +12611,7 @@

All Classes and Interfaces<
Configuration
- +
ConflictingTrait<T extends ConflictingTrait<T>>
diff --git a/javadoc/com/commercetools/docs/meta/Configuration.html b/javadoc/com/commercetools/docs/meta/Configuration.html index bf647b4f5a2..769064e63b4 100644 --- a/javadoc/com/commercetools/docs/meta/Configuration.html +++ b/javadoc/com/commercetools/docs/meta/Configuration.html @@ -73,7 +73,7 @@

Class Configuration


public class Configuration extends Object
-
Table of content +
Table of content

Configuration

ApiRoot and ProjectApiRoot

@@ -102,6 +102,15 @@

ApiRoot and ProjectApiRoot

.build(), ServiceRegion.GCP_EUROPE_WEST1) .build("my-project"); + +// Project scoped ApiRoot config for Europe projects +ProjectApiRoot projectApiRootGcpEu = ApiRootBuilder.of() + .defaultClient(ClientCredentials.of() + .withClientId("your-client-id") + .withClientSecret("your-client-secret") + .build(), + ServiceRegion.valueOf("GCP_EUROPE_WEST1")) + .build("my-project");

See the test code.

Similar configuration to create the root instances for the Import API

@@ -123,6 +132,32 @@

ApiRoot and ProjectApiRoot

.build("my-projectkey");

See the test code.

+

Custom URLs

+ + To use custom URLs for API endpoints and authentication you have to provide the base URIs to the defaultClient method + +
// Project scoped ApiRoot config using ServiceRegion class
+ProjectApiRoot projectApiRoot = ApiRootBuilder.of()
+        .defaultClient(
+            ClientCredentials.of()
+                    .withClientId("your-client-id")
+                    .withClientSecret("your-client-secret")
+                    .build(),
+            ServiceRegion.GCP_EUROPE_WEST1.getOAuthTokenUrl(), ServiceRegion.GCP_EUROPE_WEST1.getApiUrl())
+        .build("my-project");
+
+// Project scoped ApiRoot config using URI strings
+ProjectApiRoot projectApiRoot2 = ApiRootBuilder.of()
+        .defaultClient(
+            ClientCredentials.of()
+                    .withClientId("your-client-id")
+                    .withClientSecret("your-client-secret")
+                    .build(),
+            "https://auth.europe-west1.gcp.commercetools.com/oauth/token",
+            "https://api.europe-west1.gcp.commercetools.com/")
+        .build("my-project");
+

See the test code.

+

Custom HTTP client

The builder can be instantiated with a custom VrapHttpClient instance. For example a diff --git a/javadoc/com/commercetools/docs/meta/GettingStarted.html b/javadoc/com/commercetools/docs/meta/GettingStarted.html index d44dc469772..2d319be9976 100644 --- a/javadoc/com/commercetools/docs/meta/GettingStarted.html +++ b/javadoc/com/commercetools/docs/meta/GettingStarted.html @@ -104,6 +104,15 @@

Instantiation

.build(), ServiceRegion.GCP_EUROPE_WEST1) .build("my-project"); + +// Project scoped ApiRoot config for Europe projects +ProjectApiRoot projectApiRootGcpEu = ApiRootBuilder.of() + .defaultClient(ClientCredentials.of() + .withClientId("your-client-id") + .withClientSecret("your-client-secret") + .build(), + ServiceRegion.valueOf("GCP_EUROPE_WEST1")) + .build("my-project");

See the test code.

Performing requests

diff --git a/javadoc/com/commercetools/docs/meta/package-summary.html b/javadoc/com/commercetools/docs/meta/package-summary.html index 71df1b7e8d8..9fa45b07c6e 100644 --- a/javadoc/com/commercetools/docs/meta/package-summary.html +++ b/javadoc/com/commercetools/docs/meta/package-summary.html @@ -81,7 +81,7 @@

Package com.commer
Configuration
- +
DataRepresentation
diff --git a/javadoc/index-files/index-3.html b/javadoc/index-files/index-3.html index 41a8a0863cd..7d8eaa329f9 100644 --- a/javadoc/index-files/index-3.html +++ b/javadoc/index-files/index-3.html @@ -10385,7 +10385,7 @@

C

 
Configuration - Class in com.commercetools.docs.meta
- +
Configuration() - Constructor for class com.commercetools.docs.meta.Configuration
 
diff --git a/javadoc/index.html b/javadoc/index.html index ce558211cd7..6292ef4c1dc 100644 --- a/javadoc/index.html +++ b/javadoc/index.html @@ -78,7 +78,7 @@

First steps

  • Configuration -
    • ApiRoot and ProjectApiRoot
    • Custom HTTP client
    • Error handling
      • Unwrap exceptions
      • Not found
    +
    • ApiRoot and ProjectApiRoot
    • Custom URLs
    • Custom HTTP client
    • Error handling
      • Unwrap exceptions
      • Not found
  • Authentication