Skip to content

Commit 9658f37

Browse files
docs cleanup 🎉
1 parent a5f1e72 commit 9658f37

File tree

12 files changed

+85
-70
lines changed

12 files changed

+85
-70
lines changed

src/main/java/com/contentstack/cms/Contentstack.java

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
package com.contentstack.cms;
22

33
import com.contentstack.cms.core.AuthInterceptor;
4-
import com.contentstack.cms.models.Error;
54
import com.contentstack.cms.core.Util;
5+
import com.contentstack.cms.models.Error;
66
import com.contentstack.cms.models.LoginDetails;
77
import com.contentstack.cms.organization.Organization;
88
import com.contentstack.cms.stack.Stack;
99
import com.contentstack.cms.user.User;
1010
import com.google.gson.Gson;
1111
import okhttp3.OkHttpClient;
1212
import okhttp3.ResponseBody;
13+
import okhttp3.logging.HttpLoggingInterceptor;
1314
import org.jetbrains.annotations.NotNull;
1415
import retrofit2.Response;
1516
import retrofit2.Retrofit;
1617
import retrofit2.converter.gson.GsonConverterFactory;
17-
import okhttp3.logging.HttpLoggingInterceptor;
1818

1919
import java.io.IOException;
2020
import java.net.Proxy;
@@ -25,7 +25,12 @@
2525
import static com.contentstack.cms.core.Util.*;
2626

2727
/**
28-
* The type Contentstack.
28+
* <b>Contentstack Java Management SDK</b>
29+
* <br>
30+
* <b>Contentstack Java Management SDK</b> interact with the Content Management APIs and allow you to create, update,
31+
* delete, and fetch content from your Contentstack account. They are read-write in nature.
32+
* <b>
33+
* You can use them to build your own apps and manage your content from Contentstack.
2934
*/
3035
public class Contentstack {
3136

@@ -63,7 +68,11 @@ public class Contentstack {
6368
* </pre>
6469
* <br>
6570
*
66-
* @return User user
71+
* @return User
72+
* @author ishaileshmishra
73+
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#users">User
74+
* </a>
75+
* @since 2022-05-19
6776
*/
6877
public User user() {
6978
if (this.authtoken == null)
@@ -103,12 +112,15 @@ public User user() {
103112
* <br>
104113
*
105114
* @param emailId
106-
* the email id
115+
* the email id of the user
107116
* @param password
108-
* the password
109-
* @return response the Response type of @{@link LoginDetails}
117+
* the password of the user
118+
* @return LoginDetails
110119
* @throws IOException
111-
* the io exception
120+
* the IOException
121+
* @author ishaileshmishra
122+
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#users">User
123+
* </a>
112124
*/
113125
public Response<LoginDetails> login(String emailId, String password) throws IOException {
114126
if (this.authtoken != null)
@@ -155,9 +167,16 @@ public Response<LoginDetails> login(String emailId, String password) throws IOEx
155167
* the password
156168
* @param tfaToken
157169
* the tfa token
158-
* @return response the Response type of @{@link LoginDetails} throws {@link IOException}
170+
* @return LoginDetails
159171
* @throws IOException
160172
* the io exception
173+
* @throws IOException
174+
* the IOException
175+
* @author ishaileshmishra
176+
* @see <a
177+
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#log-in-to-your-account">Login
178+
* your account
179+
* </a>
161180
*/
162181
public Response<LoginDetails> login(String emailId, String password, String tfaToken) throws IOException {
163182
if (this.authtoken != null)
@@ -400,9 +419,12 @@ public Builder() {
400419
* InetSocketAddress(proxyHost, proxyPort));
401420
* <br>
402421
* <pre>
403-
* Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("hostname", 433));
404-
* Contentstack contentstack = new Contentstack.Builder().setProxy(proxy).build();
405-
* </pre>
422+
* {
423+
* @code
424+
* Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("hostname", 433));
425+
* Contentstack contentstack = new Contentstack.Builder().setProxy(proxy).build();
426+
* }
427+
* </pre>
406428
*
407429
* @param proxy
408430
* the proxy

src/main/java/com/contentstack/cms/core/AuthInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* responses coming back in. Typically, interceptors add, remove, or transform headers on the request. Depending on the
1616
* API implementation, you'll want to pass the auth token as the value for the Authorization header.
1717
*
18-
* @author Shailesh Mishra
18+
* @author ishaileshmishra
1919
* @version 1.0.0
2020
* @since 2022-05-19
2121
*/

src/main/java/com/contentstack/cms/core/CMSLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* The Contentstack Logger
99
*
10-
* @author Shailesh Mishra
10+
* @author ishaileshmishra
1111
* @version 1.0.0
1212
* @since 2022-05-19
1313
*/

src/main/java/com/contentstack/cms/core/CMSRuntimeException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* CMSRuntimeException that extends Exception class
55
*
6-
* @author Shailesh Mishra
6+
* @author ishaileshmishra
77
* @version 1.0.0
88
* @since 2022-05-19
99
*/

src/main/java/com/contentstack/cms/core/CSResponse.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
import java.io.IOException;
1010
import java.util.Objects;
1111

12+
/**
13+
* Contentstack Response:
14+
*
15+
* @author ishaileshmishra
16+
* @version 1.0.0
17+
* @since 2022-05-19
18+
*/
19+
1220
public class CSResponse {
1321

1422
private static final String MODEL_NULL_CHECK = "model class == null";

src/main/java/com/contentstack/cms/core/Callback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* The Callback for the contentstack response
55
*
6-
* @author Shailesh Mishra
6+
* @author ishaileshmishra
77
* @version 1.0.0
88
* @since 2022-05-19
99
*/

src/main/java/com/contentstack/cms/core/ContentstackResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* The ContentstackResponse is the response when we execute the API Response, ContentstackResponse contains different
1212
* response type
1313
*
14-
* @author Shailesh Mishra
14+
* @author ishaileshmishra
1515
* @version 1.0.0
1616
* @since 2022-05-19
1717
*/

src/main/java/com/contentstack/cms/core/ResponseResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* The Contentstack ResponseResult class that accepts different types of Models
1313
*
14-
* @author Shailesh Mishra
14+
* @author ishaileshmishra
1515
* @version 1.0.0
1616
* @since 2022-05-19
1717
*/

src/main/java/com/contentstack/cms/core/RetryCallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* The Contentstack RetryCallback
1111
*
12-
* @author Shailesh Mishra
12+
* @author ishaileshmishra
1313
* @version 1.0.0
1414
* @since 2022-05-19
1515
*/

src/main/java/com/contentstack/cms/core/Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* The utility class that contains utility common functions
1212
*
13-
* @author Shailesh Mishra
13+
* @author ishaileshmishra
1414
* @version 1.0.0
1515
* @since 2022-05-19
1616
*/

0 commit comments

Comments
 (0)