Skip to content

Commit

Permalink
CS-42937 : Support for Early Access Header
Browse files Browse the repository at this point in the history
CS-42936 : Taxonomy document and Test
  • Loading branch information
ishaileshmishra committed Dec 15, 2023
1 parent f9c518b commit c443286
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/contentstack/cms/stack/Entry.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public Entry addHeaders(@NotNull HashMap<String, String> headers) {
* Set header for the request
*
* @param key Removes query param using key of request
* @return instance of {@link Entry}
*/
public Entry removeParam(@NotNull String key) {
this.params.remove(key);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/contentstack/cms/stack/Stack.java
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ public Taxonomy taxonomy() {
*
* @param taxonomyUid the taxonomy uid
* @return instance of Taxonomy
* <p></p>
* <br>
* <pre>
* {@code
* Stack stack = new Contentstack.Builder().setAuthtoken("authtoken").build().stack();
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/contentstack/cms/stack/Terms.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public Terms addHeaders(@NotNull HashMap<String, String> headers) {
* Create Terms call.
*
* @param body The JSONObject request body
* @return instance of Call <p></p> <b>Example</b> <pre> {@code
* @return instance of Call <br> <b>Example</b> <pre> {@code
* Stack stack = new Contentstack.Builder().build().stack(headers);
* JSONObject body = new JSONObject();
* Term term = stack.taxonomy("taxonomyId").terms().create(body);
Expand Down Expand Up @@ -161,7 +161,7 @@ public Call<ResponseBody> create(@NotNull JSONObject body) {
* <b>limit</b> - Limit the result to number of documents/nodes
* </li>
* </ul>
* <p></p>
* <br>
* <b>Example</b>
* <pre>
* {@code
Expand All @@ -181,7 +181,7 @@ public Call<ResponseBody> find() {
* Fetch single term based on term uid.
*
* @param termUid The term for which we need the details
* @return instance of call <p> Supported Query Parameters: to use query parameters use #addParams("key", "value"); <ul> <li><b>include_children_count</b> - Include count of number of children under each term <li> <b>include_referenced_entries_count</b> - Include count of the entries where this term is referred </li> </ul> <p></p> <b>Example</b> <pre> {@code
* @return instance of call <br> Supported Query Parameters: to use query parameters use #addParams("key", "value"); <ul> <li><b>include_children_count</b> - Include count of number of children under each term <li> <b>include_referenced_entries_count</b> - Include count of the entries where this term is referred </li> </ul> <br> <b>Example</b> <pre> {@code
* Stack stack = new Contentstack.Builder().build().stack(headers);
* Term term = stack.taxonomy("taxonomyId").terms().find();
* } </pre>
Expand All @@ -198,7 +198,7 @@ public Call<ResponseBody> fetch(@NotNull String termUid) {
* @return The details of the term descendants <p> URL/Query parameters <ul> <li> <b>depth</b> - Include the terms upto the depth specified if set to a number greater than 0, include all the terms if set to 0, default depth will be set to 1 </li><li> <b>include_children_count</b> - Include count of number of children under each term </li><li> <b>include_referenced_entries_count</b> - Include count of the entries where atleast 1 term of this taxonomy is referred </li><li> <b>include_count</b> - Include count of the documents/nodes that matched the query </li><li> <b>skip</b> - Skip the number of documents/nodes </li><li> <b>limit</b> - Limit the result to number of documents/nodes </li> </ul> <p> <b>Example</b> <pre> {@code
* Stack stack = new Contentstack.Builder().build().stack(headers);
* Term term = stack.taxonomy("taxonomyId").terms().descendants("termId").;
* } </pre> <p>
* } </pre> <br>
*/
public Call<ResponseBody> descendants(@NotNull String termUid) {
return this.taxonomyService.descendantsTerm(this.headers, this.taxonomyId, termUid, this.params);
Expand Down Expand Up @@ -250,15 +250,15 @@ public Call<ResponseBody> update(@NotNull String termUid, @NotNull JSONObject bo
* "order": 2
* }
* }
* <p>
* <br>
* //Under an existing Term on a different level:
* {
* "term": {
* "parent_uid": "term_1",
* "order": 5
* }
* }
* <p>
* <br>
* //Under an existing Term on the same level(Reorder Term):
* {
* "term": {
Expand Down

0 comments on commit c443286

Please sign in to comment.