Skip to content

Commit

Permalink
Update javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Nov 9, 2023
1 parent c306781 commit 594a62c
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 5 deletions.
2 changes: 1 addition & 1 deletion javadoc/allclasses-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12611,7 +12611,7 @@ <h1 title="All Classes and Interfaces" class="title">All Classes and Interfaces<
</div>
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="com/commercetools/docs/meta/Configuration.html" title="class in com.commercetools.docs.meta">Configuration</a></div>
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
<div class="block"><b>Table of content</b><ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#api-root">ApiRoot and ProjectApiRoot</a></li><li><a href="#custom-client">Custom HTTP client</a></li><li><a href="#error-handling">Error handling</a></li><ul><li><a href="#unwrap-exceptions">Unwrap exceptions</a></li><li><a href="#not-found">Not found</a></li></ul></ul></ul></div>
<div class="block"><b>Table of content</b><ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#api-root">ApiRoot and ProjectApiRoot</a></li><li><a href="#custom-urls">Custom URLs</a></li><li><a href="#custom-client">Custom HTTP client</a></li><li><a href="#error-handling">Error handling</a></li><ul><li><a href="#unwrap-exceptions">Unwrap exceptions</a></li><li><a href="#not-found">Not found</a></li></ul></ul></ul></div>
</div>
<div class="col-first odd-row-color all-classes-table all-classes-table-tab1"><a href="com/commercetools/api/client/ConflictingTrait.html" title="interface in com.commercetools.api.client">ConflictingTrait</a>&lt;<a href="com/commercetools/api/client/ConflictingTrait.html" title="type parameter in ConflictingTrait">T</a> extends <a href="com/commercetools/api/client/ConflictingTrait.html" title="interface in com.commercetools.api.client">ConflictingTrait</a>&lt;<a href="com/commercetools/api/client/ConflictingTrait.html" title="type parameter in ConflictingTrait">T</a>&gt;&gt;</div>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab1">
Expand Down
37 changes: 36 additions & 1 deletion javadoc/com/commercetools/docs/meta/Configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h1 title="Class Configuration" class="title">Class Configuration</h1>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">Configuration</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block"><b>Table of content</b><ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#api-root">ApiRoot and ProjectApiRoot</a></li><li><a href="#custom-client">Custom HTTP client</a></li><li><a href="#error-handling">Error handling</a></li><ul><li><a href="#unwrap-exceptions">Unwrap exceptions</a></li><li><a href="#not-found">Not found</a></li></ul></ul></ul>
<div class="block"><b>Table of content</b><ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#api-root">ApiRoot and ProjectApiRoot</a></li><li><a href="#custom-urls">Custom URLs</a></li><li><a href="#custom-client">Custom HTTP client</a></li><li><a href="#error-handling">Error handling</a></li><ul><li><a href="#unwrap-exceptions">Unwrap exceptions</a></li><li><a href="#not-found">Not found</a></li></ul></ul></ul>
<h2 id=configuration>Configuration</h2>

<h3 id="api-root">ApiRoot and ProjectApiRoot</h3>
Expand Down Expand Up @@ -102,6 +102,15 @@ <h3 id="api-root">ApiRoot and ProjectApiRoot</h3>
.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");
</code><p>See the <a href="https://github.com/commercetools/commercetools-sdk-java-v2/blob/master/commercetools/internal-docs/src/test/java/example/ExamplesTest.java" target="_blank">test code</a>.</pre></div>

<p>Similar configuration to create the root instances for the Import API</p>
Expand All @@ -123,6 +132,32 @@ <h3 id="api-root">ApiRoot and ProjectApiRoot</h3>
.build("my-projectkey");
</code><p>See the <a href="https://github.com/commercetools/commercetools-sdk-java-v2/blob/master/commercetools/internal-docs/src/test/java/example/ImportExamplesTest.java" target="_blank">test code</a>.</pre></div>

<h3 id="custom-urls">Custom URLs</h3>

To use custom URLs for API endpoints and authentication you have to provide the base URIs to the defaultClient method

<div id="example-ExamplesTest-customUrls--%s" class=code-example><pre><code class='java'>// 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");
</code><p>See the <a href="https://github.com/commercetools/commercetools-sdk-java-v2/blob/master/commercetools/internal-docs/src/test/java/example/ExamplesTest.java" target="_blank">test code</a>.</pre></div>

<h3 id="custom-client">Custom HTTP client</h3>

<p>The builder can be instantiated with a custom <a href="../../../../io/vrap/rmf/base/client/VrapHttpClient.html" title="interface in io.vrap.rmf.base.client"><code>VrapHttpClient</code></a> instance. For example a
Expand Down
9 changes: 9 additions & 0 deletions javadoc/com/commercetools/docs/meta/GettingStarted.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ <h3 id=instantiation>Instantiation</h3>
.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");
</code><p>See the <a href="https://github.com/commercetools/commercetools-sdk-java-v2/blob/master/commercetools/internal-docs/src/test/java/example/ExamplesTest.java" target="_blank">test code</a>.</pre></div>

<h3 id=perform-requests>Performing requests</h3>
Expand Down
2 changes: 1 addition & 1 deletion javadoc/com/commercetools/docs/meta/package-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h1 title="Package com.commercetools.docs.meta" class="title">Package com.commer
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="Configuration.html" title="class in com.commercetools.docs.meta">Configuration</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block"><b>Table of content</b><ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#api-root">ApiRoot and ProjectApiRoot</a></li><li><a href="#custom-client">Custom HTTP client</a></li><li><a href="#error-handling">Error handling</a></li><ul><li><a href="#unwrap-exceptions">Unwrap exceptions</a></li><li><a href="#not-found">Not found</a></li></ul></ul></ul></div>
<div class="block"><b>Table of content</b><ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#api-root">ApiRoot and ProjectApiRoot</a></li><li><a href="#custom-urls">Custom URLs</a></li><li><a href="#custom-client">Custom HTTP client</a></li><li><a href="#error-handling">Error handling</a></li><ul><li><a href="#unwrap-exceptions">Unwrap exceptions</a></li><li><a href="#not-found">Not found</a></li></ul></ul></ul></div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="DataRepresentation.html" title="class in com.commercetools.docs.meta">DataRepresentation</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
Expand Down
2 changes: 1 addition & 1 deletion javadoc/index-files/index-3.html
Original file line number Diff line number Diff line change
Expand Up @@ -10385,7 +10385,7 @@ <h2 class="title" id="I:C">C</h2>
<dd>&nbsp;</dd>
<dt><a href="../com/commercetools/docs/meta/Configuration.html" class="type-name-link" title="class in com.commercetools.docs.meta">Configuration</a> - Class in <a href="../com/commercetools/docs/meta/package-summary.html">com.commercetools.docs.meta</a></dt>
<dd>
<div class="block"><b>Table of content</b><ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#api-root">ApiRoot and ProjectApiRoot</a></li><li><a href="#custom-client">Custom HTTP client</a></li><li><a href="#error-handling">Error handling</a></li><ul><li><a href="#unwrap-exceptions">Unwrap exceptions</a></li><li><a href="#not-found">Not found</a></li></ul></ul></ul></div>
<div class="block"><b>Table of content</b><ul><li><a href="#configuration">Configuration</a></li><ul><li><a href="#api-root">ApiRoot and ProjectApiRoot</a></li><li><a href="#custom-urls">Custom URLs</a></li><li><a href="#custom-client">Custom HTTP client</a></li><li><a href="#error-handling">Error handling</a></li><ul><li><a href="#unwrap-exceptions">Unwrap exceptions</a></li><li><a href="#not-found">Not found</a></li></ul></ul></ul></div>
</dd>
<dt><a href="../com/commercetools/docs/meta/Configuration.html#%3Cinit%3E()" class="member-name-link">Configuration()</a> - Constructor for class com.commercetools.docs.meta.<a href="../com/commercetools/docs/meta/Configuration.html" title="class in com.commercetools.docs.meta">Configuration</a></dt>
<dd>&nbsp;</dd>
Expand Down
2 changes: 1 addition & 1 deletion javadoc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ <h2>First steps</h2>
</li>
<li>
<a href="com/commercetools/docs/meta/Configuration.html" title="class in com.commercetools.docs.meta"><code>Configuration</code></a>
<ul><li><code>ApiRoot and ProjectApiRoot</code></li><li><code>Custom HTTP client</code></li><li><code>Error handling</code></li><ul><li><code>Unwrap exceptions</code></li><li><code>Not found</code></li></ul></ul>
<ul><li><code>ApiRoot and ProjectApiRoot</code></li><li><code>Custom URLs</code></li><li><code>Custom HTTP client</code></li><li><code>Error handling</code></li><ul><li><code>Unwrap exceptions</code></li><li><code>Not found</code></li></ul></ul>
</li>
<li>
<a href="com/commercetools/docs/meta/Authentication.html" title="class in com.commercetools.docs.meta"><code>Authentication</code></a>
Expand Down

0 comments on commit 594a62c

Please sign in to comment.