@@ -24,7 +24,7 @@ public class ApiClient extends ApiFactory {
2424 /**
2525 * connectLib is an instance of ConnectLib that provides access to the library's configuration and utilities.
2626 */
27- private ConnectLib connectLib = new ConnectLib ();
27+ private final ConnectLib connectLib = new ConnectLib ();
2828
2929 /**
3030 * WebClient is a non-blocking, reactive HTTP client for making requests to the API.
@@ -63,13 +63,15 @@ public ApiClient(String baseUrlLambda) {
6363
6464 /**
6565 * Method to call the API with a GET request.
66+ *
6667 * @param routeName Name of the route to call.
6768 * @return a Mono that emits the ApiFactory response containing the parsed JSON data.
6869 */
6970 public Mono <ApiFactory > callAPIGet (String routeName ) {
7071 connectLib .Logger ().INFO (connectLib .LangManager ().getMessage (CategoriesType .APICLIENT_CLASS , "call.get" , Map .of ("routename" , routeName )));
7172
72- record ResponseData (int statusCode , String body ) {}
73+ record ResponseData (int statusCode , String body ) {
74+ }
7375
7476 return webClient .get ()
7577 .uri (routeName )
@@ -92,14 +94,16 @@ record ResponseData(int statusCode, String body) {}
9294
9395 /**
9496 * Method to call the API with a POST request.
97+ *
9598 * @param routeName Name of the route to call.
96- * @param body Body of the request (can be null for a request without body).
99+ * @param body Body of the request (can be null for a request without body).
97100 * @return a Mono that emits the ApiFactory response containing the parsed JSON data.
98101 */
99102 public Mono <ApiFactory > callAPIPost (String routeName , Map <String , Object > body ) {
100103 connectLib .Logger ().INFO (connectLib .LangManager ().getMessage (CategoriesType .APICLIENT_CLASS , "call.post" , Map .of ("routename" , routeName )));
101104
102- record ResponseData (int statusCode , String body ) {}
105+ record ResponseData (int statusCode , String body ) {
106+ }
103107
104108 return webClient .post ()
105109 .uri (routeName )
@@ -123,14 +127,16 @@ record ResponseData(int statusCode, String body) {}
123127
124128 /**
125129 * Method to call the API with a PUT request.
130+ *
126131 * @param routeName Name of the route to call.
127- * @param body Body of the request (can be null for a request without body).
132+ * @param body Body of the request (can be null for a request without body).
128133 * @return a Mono that emits the ApiFactory response containing the parsed JSON data.
129134 */
130135 public Mono <ApiFactory > callAPIPut (String routeName , Map <String , Object > body ) {
131136 connectLib .Logger ().INFO (connectLib .LangManager ().getMessage (CategoriesType .APICLIENT_CLASS , "call.put" , Map .of ("routename" , routeName )));
132137
133- record ResponseData (int statusCode , String body ) {}
138+ record ResponseData (int statusCode , String body ) {
139+ }
134140
135141 return webClient .put ()
136142 .uri (routeName )
@@ -154,14 +160,16 @@ record ResponseData(int statusCode, String body) {}
154160
155161 /**
156162 * Method to call the API with a PATCH request.
163+ *
157164 * @param routeName Name of the route to call.
158- * @param body Body of the request (can be null for a request without body).
165+ * @param body Body of the request (can be null for a request without body).
159166 * @return a Mono that emits the ApiFactory response containing the parsed JSON data.
160167 */
161168 public Mono <ApiFactory > callAPIPatch (String routeName , Map <String , Object > body ) {
162169 connectLib .Logger ().INFO (connectLib .LangManager ().getMessage (CategoriesType .APICLIENT_CLASS , "call.patch" , Map .of ("routename" , routeName )));
163170
164- record ResponseData (int statusCode , String body ) {}
171+ record ResponseData (int statusCode , String body ) {
172+ }
165173
166174 return webClient .patch ()
167175 .uri (routeName )
@@ -185,13 +193,15 @@ record ResponseData(int statusCode, String body) {}
185193
186194 /**
187195 * Method to call the API with a DELETE request.
196+ *
188197 * @param routeName Name of the route to call.
189198 * @return a Mono that emits the ApiFactory response containing the parsed JSON data.
190199 */
191200 public Mono <ApiFactory > callAPIDelete (String routeName ) {
192201 connectLib .Logger ().INFO (connectLib .LangManager ().getMessage (CategoriesType .APICLIENT_CLASS , "call.delete" , Map .of ("routename" , routeName )));
193202
194- record ResponseData (int statusCode , String body ) {}
203+ record ResponseData (int statusCode , String body ) {
204+ }
195205
196206 return webClient .delete ()
197207 .uri (routeName )
0 commit comments