Skip to content

Commit 03bf4ea

Browse files
fetch() & find()
1 parent e4c4808 commit 03bf4ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+222
-251
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<artifactId>cms</artifactId>
77
<packaging>jar</packaging>
88
<name>contentstack-management-java</name>
9-
<version>1.0.0-SNAPSHOT</version>
9+
<version>1.0.0-a1-SNAPSHOT</version>
1010
<description>Contentstack Java Management SDK for Content Management API, Contentstack is a headless CMS with an
1111
API-first approach
1212
</description>

src/main/java/com/contentstack/cms/organization/Organization.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public void removeParam(@NotNull String key) {
120120
*
121121
* @return Call
122122
*/
123-
public Call<ResponseBody> fetch() {
123+
public Call<ResponseBody> find() {
124124
return this.service.fetch(this.headers, this.params);
125125
}
126126

@@ -138,7 +138,7 @@ public Call<ResponseBody> fetch() {
138138
* {@link #addParam(String, Object)} the Query Parameters include_plan(optional) = true
139139
* @return Call
140140
*/
141-
public Call<ResponseBody> single(@NotNull String organizationUid) {
141+
public Call<ResponseBody> fetch(@NotNull String organizationUid) {
142142
return service.getSingle(this.headers, organizationUid, this.params);
143143
}
144144

src/main/java/com/contentstack/cms/stack/Alias.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protected void clearParams() {
8888
* aliases</a>
8989
* @since 1.0.0
9090
*/
91-
public Call<ResponseBody> fetch() {
91+
public Call<ResponseBody> find() {
9292
return this.service.fetch(this.headers, this.params);
9393
}
9494

@@ -103,7 +103,7 @@ public Call<ResponseBody> fetch() {
103103
* Get a single branch</a>
104104
* @since 1.0.0
105105
*/
106-
public Call<ResponseBody> single(@NotNull String uid) {
106+
public Call<ResponseBody> fetch(@NotNull String uid) {
107107
return this.service.single(this.headers, uid);
108108
}
109109

src/main/java/com/contentstack/cms/stack/Asset.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public Folder folder() {
134134
* As</a>
135135
* @since 1.0.0
136136
*/
137-
public Call<ResponseBody> fetch() {
137+
public Call<ResponseBody> find() {
138138
return this.service.fetch(this.headers, this.params);
139139
}
140140

@@ -153,7 +153,7 @@ public Call<ResponseBody> fetch() {
153153
* single asset</a>
154154
* @since 1.0.0
155155
*/
156-
public Call<ResponseBody> single(@NotNull String uid) {
156+
public Call<ResponseBody> fetch(@NotNull String uid) {
157157
return this.service.single(this.headers, uid, this.params);
158158
}
159159

src/main/java/com/contentstack/cms/stack/AuditLog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected void clearParams() {
8787
*
8888
* @return Call
8989
*/
90-
public Call<ResponseBody> fetch() {
90+
public Call<ResponseBody> find() {
9191
return this.service.fetch(this.headers, this.params);
9292
}
9393

@@ -99,7 +99,7 @@ public Call<ResponseBody> fetch() {
9999
* The UID of a specific log item you want to retrieve the details of
100100
* @return Call
101101
*/
102-
public Call<ResponseBody> fetchAuditLog(@NotNull String logItemUid) {
102+
public Call<ResponseBody> fetch(@NotNull String logItemUid) {
103103
return this.service.fetch(this.headers, logItemUid);
104104
}
105105

src/main/java/com/contentstack/cms/stack/Branch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected void clearParams() {
9090
* branches</a>
9191
* @since 1.0.0
9292
*/
93-
public Call<ResponseBody> fetch() {
93+
public Call<ResponseBody> find() {
9494
return this.service.fetch(this.headers, this.params);
9595
}
9696

@@ -105,7 +105,7 @@ public Call<ResponseBody> fetch() {
105105
* Get a single branch</a>
106106
* @since 1.0.0
107107
*/
108-
public Call<ResponseBody> single(@NotNull String uid) {
108+
public Call<ResponseBody> fetch(@NotNull String uid) {
109109
return this.service.single(this.headers, uid);
110110
}
111111

src/main/java/com/contentstack/cms/stack/ContentType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ protected void clearParams() {
139139
* @see #addParam(String, Object) to add query params
140140
* @since 1.0.0
141141
*/
142-
public Call<ResponseBody> fetch() {
142+
public Call<ResponseBody> find() {
143143
return service.fetch(this.headers, this.params);
144144
}
145145

@@ -181,7 +181,7 @@ public Call<ResponseBody> fetch() {
181181
* @see #addParam(String, Object) to add query params
182182
* @since 1.0.0
183183
*/
184-
public Call<ResponseBody> single() {
184+
public Call<ResponseBody> fetch() {
185185
validate();
186186
return service.single(this.headers, this.contentTypeUid, this.params);
187187
}

src/main/java/com/contentstack/cms/stack/DeliveryToken.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import org.jetbrains.annotations.NotNull;
55
import org.json.simple.JSONObject;
66
import retrofit2.Call;
7-
import retrofit2.Retrofit;
87

98
import java.util.HashMap;
109

@@ -92,7 +91,7 @@ protected void clearParams() {
9291
* @see #addParam(String, Object) to add query parameters
9392
* @since 1.0.0
9493
*/
95-
public Call<ResponseBody> fetch() {
94+
public Call<ResponseBody> find() {
9695
return this.service.getDeliveryToken(this.headers);
9796
}
9897

@@ -110,7 +109,7 @@ public Call<ResponseBody> fetch() {
110109
* @see #addParam(String, Object) to add query parameters
111110
* @since 1.0.0
112111
*/
113-
public Call<ResponseBody> single(@NotNull String tokenUid) {
112+
public Call<ResponseBody> fetch(@NotNull String tokenUid) {
114113
return this.service.getDeliveryToken(this.headers, tokenUid);
115114
}
116115

src/main/java/com/contentstack/cms/stack/Entry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected void clearParams() {
110110
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#get-all-entries">Get
111111
* All Entry</a>
112112
*/
113-
public Call<ResponseBody> fetch() {
113+
public Call<ResponseBody> find() {
114114
return this.service.fetch(this.headers, this.contentTypeUid, this.params);
115115
}
116116

@@ -129,7 +129,7 @@ public Call<ResponseBody> fetch() {
129129
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#get-a-single-entry">Get A
130130
* Single Entry</a>
131131
*/
132-
public Call<ResponseBody> single(@NotNull String entryUid) {
132+
public Call<ResponseBody> fetch(@NotNull String entryUid) {
133133
return this.service.single(headers, this.contentTypeUid, entryUid, this.params);
134134
}
135135

src/main/java/com/contentstack/cms/stack/Environment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected void clearParams() {
9999
* @see #addParam(String, Object) to add query parameters
100100
* @since 1.0.0
101101
*/
102-
public Call<ResponseBody> fetch() {
102+
public Call<ResponseBody> find() {
103103
return this.service.fetch(this.headers, this.params);
104104
}
105105

@@ -121,7 +121,7 @@ public Call<ResponseBody> fetch() {
121121
* @see #addParam(String, Object) to add query parameters
122122
* @since 1.0.0
123123
*/
124-
public Call<ResponseBody> single(@NotNull String environment) {
124+
public Call<ResponseBody> fetch(@NotNull String environment) {
125125
return this.service.getEnv(this.headers, environment);
126126
}
127127

0 commit comments

Comments
 (0)