1313import java .util .Map ;
1414
1515/**
16- * The type User.
17- */
18- /*
19- * All accounts registered with Contentstack are known as Users. A stack can
20- * have many users with varying permissions and roles.
16+ * All accounts registered with Contentstack are known as Users. A stack can have many users with varying permissions
17+ * and roles.
18+ *
19+ * @author ***REMOVED***
20+ * @version 1.0.0
21+ * @since 2022-05-19
2122 */
2223public class User {
2324
@@ -27,20 +28,19 @@ public class User {
2728 * Instantiates a new User.
2829 *
2930 * @param client
30- * the client
31+ * the client
3132 */
3233 public User (Retrofit client ) {
3334 this .userService = client .create (UserService .class );
3435 }
3536
3637 /**
37- * The Log in to your account request is used to sign in to your Contentstack
38- * account and obtain the authtoken.
38+ * The Log in to your account request is used to sign in to your Contentstack account and obtain the authtoken.
3939 *
4040 * @param emailId
41- * the email id
41+ * the email id
4242 * @param password
43- * the password
43+ * the password
4444 * @return the call
4545 */
4646 public Call <LoginDetails > login (@ NotNull String emailId , @ NotNull String password ) {
@@ -55,11 +55,11 @@ public Call<LoginDetails> login(@NotNull String emailId, @NotNull String passwor
5555 * Login call.
5656 *
5757 * @param emailId
58- * the email id
58+ * the email id
5959 * @param password
60- * the password
60+ * the password
6161 * @param tfaToken
62- * the tfa token
62+ * the tfa token
6363 * @return the call
6464 */
6565 public Call <LoginDetails > login (@ NotNull String emailId , @ NotNull String password , @ NotNull String tfaToken ) {
@@ -81,10 +81,8 @@ private HashMap<String, String> setCredentials(@NotNull String... arguments) {
8181 }
8282
8383 /**
84- * The Get user call returns comprehensive information of an existing user
85- * account. The information returned
86- * includes details of the stacks owned by and shared with the specified user
87- * account. <br>
84+ * The Get user call returns comprehensive information of an existing user account. The information returned
85+ * includes details of the stacks owned by and shared with the specified user account. <br>
8886 *
8987 * @return {@link UserService}
9088 */
@@ -94,30 +92,25 @@ public Call<ResponseBody> getUser() {
9492
9593
9694 /**
97- * The Get user call returns comprehensive information of an existing user
98- * account. The information returned
99- * includes details of the stacks and organisation owned by and shared with the
100- * specified user account.
95+ * The Get user call returns comprehensive information of an existing user account. The information returned
96+ * includes details of the stacks and organisation owned by and shared with the specified user account.
10197 *
10298 * @param query
103- * parameters
99+ * parameters
104100 * @return {@link UserService}
105101 */
106102 public Call <ResponseBody > getUserOrganizations (@ NotNull Map <String , Object > query ) {
107103 return this .userService .getUserOrganization (query );
108104 }
109105
110106 /**
111- * The Update User API Request updates the details of an existing user account.
112- * Only the information entered here
113- * will be updated, the existing data will remain unaffected. <br>
114- * When executing the API call, under the 'Body'
115- * section, enter the information of the user that you wish to update. This
116- * information should be in JSON format.
107+ * The Update User API Request updates the details of an existing user account. Only the information entered here
108+ * will be updated, the existing data will remain unaffected. <br> When executing the API call, under the 'Body'
109+ * section, enter the information of the user that you wish to update. This information should be in JSON format.
117110 * <br>
118111 *
119112 * @param strBody
120- * the str body
113+ * the str body
121114 * @return {@link UserService}
122115 */
123116 public Call <ResponseBody > updateUser (String strBody ) {
@@ -131,69 +124,61 @@ private RequestBody toBody(String bodyString) {
131124 }
132125
133126 /**
134- * The activate_token a user account call activates the account of a user after
135- * signing up. For account activation,
127+ * The activate_token a user account call activates the account of a user after signing up. For account activation,
136128 * you will require the token received in the activation email. <br>
137129 *
138130 * @param activationToken
139- * The activation token
131+ * The activation token
140132 * @param requestBody
141- * The request body
133+ * The request body
142134 * @return {@link UserService}
143135 */
144136 public Call <ResponseBody > activateUser (@ NotNull String activationToken , String requestBody ) {
145137 return userService .activateUser (activationToken , toBody (requestBody ));
146138 }
147139
148140 /**
149- * The Request for a password call sends a request for a temporary password to
150- * log in to an account in case a user
151- * has forgotten the login password. <br>
152- * Using this temporary password, you can log in to your account and set a
141+ * The Request for a password call sends a request for a temporary password to log in to an account in case a user
142+ * has forgotten the login password. <br> Using this temporary password, you can log in to your account and set a
153143 * new password for your Contentstack account. <br>
154144 * <ul>
155145 * <li>Provide the user's email address in JSON format</li>
156146 * </ul>
157147 *
158148 * @param requestBody
159- * the request body
149+ * the request body
160150 * @return {@link UserService}
161151 */
162152 public Call <ResponseBody > requestPassword (String requestBody ) {
163153 return userService .requestPassword (toBody (requestBody ));
164154 }
165155
166156 /**
167- * The Reset password call sends a request for resetting the password of your
168- * Contentstack account. <br>
169- * When
170- * executing the call, in the 'Body' section, you need to provide the token that
171- * you receive via email, your new
157+ * The Reset password call sends a request for resetting the password of your Contentstack account. <br> When
158+ * executing the call, in the 'Body' section, you need to provide the token that you receive via email, your new
172159 * password, and password confirmation in JSON format. <br>
173160 *
174161 * @param requestBody
175- * the request body
162+ * the request body
176163 * @return {@link UserService}
177164 */
178165 public Call <ResponseBody > resetPassword (@ NotNull String requestBody ) {
179166 return userService .resetPassword (toBody (requestBody ));
180167 }
181168
182169 /**
183- * The Log out of your account call is used to sign out the user of Contentstack
184- * account
170+ * The Log out of your account call is used to sign out the user of Contentstack account
185171 *
186172 * @param authtoken
187- * : authtoken
173+ * : authtoken
188174 * @return {@link UserService}
189175 */
190176 public Call <ResponseBody > logoutWithAuthtoken (String authtoken ) {
191177 return userService .logout (authtoken );
192178 }
193179
194180 /**
195- * The Log out of your account call is used to sign out the user of Contentstack
196- * account
181+ * The Log out of your account call is used to sign out the user of Contentstack account
197182 *
198183 * @return {@link UserService}
199184 */
0 commit comments