@@ -1450,7 +1450,7 @@ public Call clearRulesAsync(
1450
1450
*/
1451
1451
private Call delCall (
1452
1452
String path ,
1453
- String parameters ,
1453
+ Map < String , Object > parameters ,
1454
1454
Object body ,
1455
1455
final ApiCallback <Object > _callback
1456
1456
) throws AlgoliaRuntimeException {
@@ -1463,7 +1463,14 @@ private Call delCall(
1463
1463
Map <String , String > headers = new HashMap <String , String >();
1464
1464
1465
1465
if (parameters != null ) {
1466
- queryParams .addAll (this .parameterToPair ("parameters" , parameters ));
1466
+ for (Map .Entry <String , Object > parameter : parameters .entrySet ()) {
1467
+ queryParams .addAll (
1468
+ this .parameterToPair (
1469
+ parameter .getKey (),
1470
+ parameter .getValue ().toString ()
1471
+ )
1472
+ );
1473
+ }
1467
1474
}
1468
1475
1469
1476
headers .put ("Accept" , "application/json" );
@@ -1481,7 +1488,7 @@ private Call delCall(
1481
1488
1482
1489
private Call delValidateBeforeCall (
1483
1490
String path ,
1484
- String parameters ,
1491
+ Map < String , Object > parameters ,
1485
1492
Object body ,
1486
1493
final ApiCallback <Object > _callback
1487
1494
) throws AlgoliaRuntimeException {
@@ -1500,14 +1507,13 @@ private Call delValidateBeforeCall(
1500
1507
*
1501
1508
* @param path The path of the API endpoint to target, anything after the /1 needs to be
1502
1509
* specified. (required)
1503
- * @param parameters URL-encoded query string. Force some query parameters to be applied for each
1504
- * query made with this API key. (optional)
1510
+ * @param parameters Query parameters to be applied to the current query. (optional)
1505
1511
* @param body The parameters to send with the custom request. (optional)
1506
1512
* @return Object
1507
1513
* @throws AlgoliaRuntimeException If fail to call the API, e.g. server error or cannot
1508
1514
* deserialize the response body
1509
1515
*/
1510
- public Object del (String path , String parameters , Object body )
1516
+ public Object del (String path , Map < String , Object > parameters , Object body )
1511
1517
throws AlgoliaRuntimeException {
1512
1518
Call req = delValidateBeforeCall (path , parameters , body , null );
1513
1519
if (req instanceof CallEcho ) {
@@ -1520,16 +1526,15 @@ public Object del(String path, String parameters, Object body)
1520
1526
}
1521
1527
1522
1528
public Object del (String path ) throws AlgoliaRuntimeException {
1523
- return this .del (path , null , null );
1529
+ return this .del (path , new HashMap <>() , null );
1524
1530
}
1525
1531
1526
1532
/**
1527
1533
* (asynchronously) This method allow you to send requests to the Algolia REST API.
1528
1534
*
1529
1535
* @param path The path of the API endpoint to target, anything after the /1 needs to be
1530
1536
* specified. (required)
1531
- * @param parameters URL-encoded query string. Force some query parameters to be applied for each
1532
- * query made with this API key. (optional)
1537
+ * @param parameters Query parameters to be applied to the current query. (optional)
1533
1538
* @param body The parameters to send with the custom request. (optional)
1534
1539
* @param _callback The callback to be executed when the API call finishes
1535
1540
* @return The request call
@@ -1538,7 +1543,7 @@ public Object del(String path) throws AlgoliaRuntimeException {
1538
1543
*/
1539
1544
public Call delAsync (
1540
1545
String path ,
1541
- String parameters ,
1546
+ Map < String , Object > parameters ,
1542
1547
Object body ,
1543
1548
final ApiCallback <Object > _callback
1544
1549
) throws AlgoliaRuntimeException {
@@ -2309,7 +2314,7 @@ public Call deleteSynonymAsync(
2309
2314
*/
2310
2315
private Call getCall (
2311
2316
String path ,
2312
- String parameters ,
2317
+ Map < String , Object > parameters ,
2313
2318
final ApiCallback <Object > _callback
2314
2319
) throws AlgoliaRuntimeException {
2315
2320
Object bodyObj = null ;
@@ -2321,7 +2326,14 @@ private Call getCall(
2321
2326
Map <String , String > headers = new HashMap <String , String >();
2322
2327
2323
2328
if (parameters != null ) {
2324
- queryParams .addAll (this .parameterToPair ("parameters" , parameters ));
2329
+ for (Map .Entry <String , Object > parameter : parameters .entrySet ()) {
2330
+ queryParams .addAll (
2331
+ this .parameterToPair (
2332
+ parameter .getKey (),
2333
+ parameter .getValue ().toString ()
2334
+ )
2335
+ );
2336
+ }
2325
2337
}
2326
2338
2327
2339
headers .put ("Accept" , "application/json" );
@@ -2339,7 +2351,7 @@ private Call getCall(
2339
2351
2340
2352
private Call getValidateBeforeCall (
2341
2353
String path ,
2342
- String parameters ,
2354
+ Map < String , Object > parameters ,
2343
2355
final ApiCallback <Object > _callback
2344
2356
) throws AlgoliaRuntimeException {
2345
2357
// verify the required parameter 'path' is set
@@ -2357,13 +2369,12 @@ private Call getValidateBeforeCall(
2357
2369
*
2358
2370
* @param path The path of the API endpoint to target, anything after the /1 needs to be
2359
2371
* specified. (required)
2360
- * @param parameters URL-encoded query string. Force some query parameters to be applied for each
2361
- * query made with this API key. (optional)
2372
+ * @param parameters Query parameters to be applied to the current query. (optional)
2362
2373
* @return Object
2363
2374
* @throws AlgoliaRuntimeException If fail to call the API, e.g. server error or cannot
2364
2375
* deserialize the response body
2365
2376
*/
2366
- public Object get (String path , String parameters )
2377
+ public Object get (String path , Map < String , Object > parameters )
2367
2378
throws AlgoliaRuntimeException {
2368
2379
Call req = getValidateBeforeCall (path , parameters , null );
2369
2380
if (req instanceof CallEcho ) {
@@ -2376,24 +2387,23 @@ public Object get(String path, String parameters)
2376
2387
}
2377
2388
2378
2389
public Object get (String path ) throws AlgoliaRuntimeException {
2379
- return this .get (path , null );
2390
+ return this .get (path , new HashMap <>() );
2380
2391
}
2381
2392
2382
2393
/**
2383
2394
* (asynchronously) This method allow you to send requests to the Algolia REST API.
2384
2395
*
2385
2396
* @param path The path of the API endpoint to target, anything after the /1 needs to be
2386
2397
* specified. (required)
2387
- * @param parameters URL-encoded query string. Force some query parameters to be applied for each
2388
- * query made with this API key. (optional)
2398
+ * @param parameters Query parameters to be applied to the current query. (optional)
2389
2399
* @param _callback The callback to be executed when the API call finishes
2390
2400
* @return The request call
2391
2401
* @throws AlgoliaRuntimeException If fail to process the API call, e.g. serializing the request
2392
2402
* body object
2393
2403
*/
2394
2404
public Call getAsync (
2395
2405
String path ,
2396
- String parameters ,
2406
+ Map < String , Object > parameters ,
2397
2407
final ApiCallback <Object > _callback
2398
2408
) throws AlgoliaRuntimeException {
2399
2409
Call call = getValidateBeforeCall (path , parameters , _callback );
@@ -4553,7 +4563,7 @@ public Call partialUpdateObjectAsync(
4553
4563
*/
4554
4564
private Call postCall (
4555
4565
String path ,
4556
- String parameters ,
4566
+ Map < String , Object > parameters ,
4557
4567
Object body ,
4558
4568
final ApiCallback <Object > _callback
4559
4569
) throws AlgoliaRuntimeException {
@@ -4566,7 +4576,14 @@ private Call postCall(
4566
4576
Map <String , String > headers = new HashMap <String , String >();
4567
4577
4568
4578
if (parameters != null ) {
4569
- queryParams .addAll (this .parameterToPair ("parameters" , parameters ));
4579
+ for (Map .Entry <String , Object > parameter : parameters .entrySet ()) {
4580
+ queryParams .addAll (
4581
+ this .parameterToPair (
4582
+ parameter .getKey (),
4583
+ parameter .getValue ().toString ()
4584
+ )
4585
+ );
4586
+ }
4570
4587
}
4571
4588
4572
4589
headers .put ("Accept" , "application/json" );
@@ -4584,7 +4601,7 @@ private Call postCall(
4584
4601
4585
4602
private Call postValidateBeforeCall (
4586
4603
String path ,
4587
- String parameters ,
4604
+ Map < String , Object > parameters ,
4588
4605
Object body ,
4589
4606
final ApiCallback <Object > _callback
4590
4607
) throws AlgoliaRuntimeException {
@@ -4603,14 +4620,13 @@ private Call postValidateBeforeCall(
4603
4620
*
4604
4621
* @param path The path of the API endpoint to target, anything after the /1 needs to be
4605
4622
* specified. (required)
4606
- * @param parameters URL-encoded query string. Force some query parameters to be applied for each
4607
- * query made with this API key. (optional)
4623
+ * @param parameters Query parameters to be applied to the current query. (optional)
4608
4624
* @param body The parameters to send with the custom request. (optional)
4609
4625
* @return Object
4610
4626
* @throws AlgoliaRuntimeException If fail to call the API, e.g. server error or cannot
4611
4627
* deserialize the response body
4612
4628
*/
4613
- public Object post (String path , String parameters , Object body )
4629
+ public Object post (String path , Map < String , Object > parameters , Object body )
4614
4630
throws AlgoliaRuntimeException {
4615
4631
Call req = postValidateBeforeCall (path , parameters , body , null );
4616
4632
if (req instanceof CallEcho ) {
@@ -4623,16 +4639,15 @@ public Object post(String path, String parameters, Object body)
4623
4639
}
4624
4640
4625
4641
public Object post (String path ) throws AlgoliaRuntimeException {
4626
- return this .post (path , null , null );
4642
+ return this .post (path , new HashMap <>() , null );
4627
4643
}
4628
4644
4629
4645
/**
4630
4646
* (asynchronously) This method allow you to send requests to the Algolia REST API.
4631
4647
*
4632
4648
* @param path The path of the API endpoint to target, anything after the /1 needs to be
4633
4649
* specified. (required)
4634
- * @param parameters URL-encoded query string. Force some query parameters to be applied for each
4635
- * query made with this API key. (optional)
4650
+ * @param parameters Query parameters to be applied to the current query. (optional)
4636
4651
* @param body The parameters to send with the custom request. (optional)
4637
4652
* @param _callback The callback to be executed when the API call finishes
4638
4653
* @return The request call
@@ -4641,7 +4656,7 @@ public Object post(String path) throws AlgoliaRuntimeException {
4641
4656
*/
4642
4657
public Call postAsync (
4643
4658
String path ,
4644
- String parameters ,
4659
+ Map < String , Object > parameters ,
4645
4660
Object body ,
4646
4661
final ApiCallback <Object > _callback
4647
4662
) throws AlgoliaRuntimeException {
@@ -4660,7 +4675,7 @@ public Call postAsync(
4660
4675
*/
4661
4676
private Call putCall (
4662
4677
String path ,
4663
- String parameters ,
4678
+ Map < String , Object > parameters ,
4664
4679
Object body ,
4665
4680
final ApiCallback <Object > _callback
4666
4681
) throws AlgoliaRuntimeException {
@@ -4673,7 +4688,14 @@ private Call putCall(
4673
4688
Map <String , String > headers = new HashMap <String , String >();
4674
4689
4675
4690
if (parameters != null ) {
4676
- queryParams .addAll (this .parameterToPair ("parameters" , parameters ));
4691
+ for (Map .Entry <String , Object > parameter : parameters .entrySet ()) {
4692
+ queryParams .addAll (
4693
+ this .parameterToPair (
4694
+ parameter .getKey (),
4695
+ parameter .getValue ().toString ()
4696
+ )
4697
+ );
4698
+ }
4677
4699
}
4678
4700
4679
4701
headers .put ("Accept" , "application/json" );
@@ -4691,7 +4713,7 @@ private Call putCall(
4691
4713
4692
4714
private Call putValidateBeforeCall (
4693
4715
String path ,
4694
- String parameters ,
4716
+ Map < String , Object > parameters ,
4695
4717
Object body ,
4696
4718
final ApiCallback <Object > _callback
4697
4719
) throws AlgoliaRuntimeException {
@@ -4710,14 +4732,13 @@ private Call putValidateBeforeCall(
4710
4732
*
4711
4733
* @param path The path of the API endpoint to target, anything after the /1 needs to be
4712
4734
* specified. (required)
4713
- * @param parameters URL-encoded query string. Force some query parameters to be applied for each
4714
- * query made with this API key. (optional)
4735
+ * @param parameters Query parameters to be applied to the current query. (optional)
4715
4736
* @param body The parameters to send with the custom request. (optional)
4716
4737
* @return Object
4717
4738
* @throws AlgoliaRuntimeException If fail to call the API, e.g. server error or cannot
4718
4739
* deserialize the response body
4719
4740
*/
4720
- public Object put (String path , String parameters , Object body )
4741
+ public Object put (String path , Map < String , Object > parameters , Object body )
4721
4742
throws AlgoliaRuntimeException {
4722
4743
Call req = putValidateBeforeCall (path , parameters , body , null );
4723
4744
if (req instanceof CallEcho ) {
@@ -4730,16 +4751,15 @@ public Object put(String path, String parameters, Object body)
4730
4751
}
4731
4752
4732
4753
public Object put (String path ) throws AlgoliaRuntimeException {
4733
- return this .put (path , null , null );
4754
+ return this .put (path , new HashMap <>() , null );
4734
4755
}
4735
4756
4736
4757
/**
4737
4758
* (asynchronously) This method allow you to send requests to the Algolia REST API.
4738
4759
*
4739
4760
* @param path The path of the API endpoint to target, anything after the /1 needs to be
4740
4761
* specified. (required)
4741
- * @param parameters URL-encoded query string. Force some query parameters to be applied for each
4742
- * query made with this API key. (optional)
4762
+ * @param parameters Query parameters to be applied to the current query. (optional)
4743
4763
* @param body The parameters to send with the custom request. (optional)
4744
4764
* @param _callback The callback to be executed when the API call finishes
4745
4765
* @return The request call
@@ -4748,7 +4768,7 @@ public Object put(String path) throws AlgoliaRuntimeException {
4748
4768
*/
4749
4769
public Call putAsync (
4750
4770
String path ,
4751
- String parameters ,
4771
+ Map < String , Object > parameters ,
4752
4772
Object body ,
4753
4773
final ApiCallback <Object > _callback
4754
4774
) throws AlgoliaRuntimeException {
0 commit comments