|
1 | 1 | package com.contentstack.cms; |
2 | 2 |
|
3 | 3 | import com.contentstack.cms.core.AuthInterceptor; |
4 | | -import com.contentstack.cms.models.Error; |
5 | 4 | import com.contentstack.cms.core.Util; |
| 5 | +import com.contentstack.cms.models.Error; |
6 | 6 | import com.contentstack.cms.models.LoginDetails; |
7 | 7 | import com.contentstack.cms.organization.Organization; |
8 | 8 | import com.contentstack.cms.stack.Stack; |
9 | 9 | import com.contentstack.cms.user.User; |
10 | 10 | import com.google.gson.Gson; |
11 | 11 | import okhttp3.OkHttpClient; |
12 | 12 | import okhttp3.ResponseBody; |
| 13 | +import okhttp3.logging.HttpLoggingInterceptor; |
13 | 14 | import org.jetbrains.annotations.NotNull; |
14 | 15 | import retrofit2.Response; |
15 | 16 | import retrofit2.Retrofit; |
16 | 17 | import retrofit2.converter.gson.GsonConverterFactory; |
17 | | -import okhttp3.logging.HttpLoggingInterceptor; |
18 | 18 |
|
19 | 19 | import java.io.IOException; |
20 | 20 | import java.net.Proxy; |
|
25 | 25 | import static com.contentstack.cms.core.Util.*; |
26 | 26 |
|
27 | 27 | /** |
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. |
29 | 34 | */ |
30 | 35 | public class Contentstack { |
31 | 36 |
|
@@ -63,7 +68,11 @@ public class Contentstack { |
63 | 68 | * </pre> |
64 | 69 | * <br> |
65 | 70 | * |
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 |
67 | 76 | */ |
68 | 77 | public User user() { |
69 | 78 | if (this.authtoken == null) |
@@ -103,12 +112,15 @@ public User user() { |
103 | 112 | * <br> |
104 | 113 | * |
105 | 114 | * @param emailId |
106 | | - * the email id |
| 115 | + * the email id of the user |
107 | 116 | * @param password |
108 | | - * the password |
109 | | - * @return response the Response type of @{@link LoginDetails} |
| 117 | + * the password of the user |
| 118 | + * @return LoginDetails |
110 | 119 | * @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> |
112 | 124 | */ |
113 | 125 | public Response<LoginDetails> login(String emailId, String password) throws IOException { |
114 | 126 | if (this.authtoken != null) |
@@ -155,9 +167,16 @@ public Response<LoginDetails> login(String emailId, String password) throws IOEx |
155 | 167 | * the password |
156 | 168 | * @param tfaToken |
157 | 169 | * the tfa token |
158 | | - * @return response the Response type of @{@link LoginDetails} throws {@link IOException} |
| 170 | + * @return LoginDetails |
159 | 171 | * @throws IOException |
160 | 172 | * 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> |
161 | 180 | */ |
162 | 181 | public Response<LoginDetails> login(String emailId, String password, String tfaToken) throws IOException { |
163 | 182 | if (this.authtoken != null) |
@@ -400,9 +419,12 @@ public Builder() { |
400 | 419 | * InetSocketAddress(proxyHost, proxyPort)); |
401 | 420 | * <br> |
402 | 421 | * <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> |
406 | 428 | * |
407 | 429 | * @param proxy |
408 | 430 | * the proxy |
|
0 commit comments