Skip to content

Commit 7c16184

Browse files
committed
Merge branch 'main' into docs/APIC-463/php-guides
2 parents dbe98a6 + 794d32a commit 7c16184

File tree

88 files changed

+1992
-1618
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1992
-1618
lines changed

clients/algoliasearch-client-java-2/algoliasearch-core/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ plugins {
44
id 'com.github.johnrengelman.shadow' version '7.0.0'
55
}
66

7-
description = 'algoliasearch-client-java-2'
8-
java.sourceCompatibility = JavaVersion.VERSION_1_8
9-
107
repositories {
118
mavenCentral()
129
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
POM_ARTIFACT_ID=algoliasearch-client-java

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/ApiClient.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,20 +426,23 @@ public void processHeaderParams(
426426
Request.Builder reqBuilder
427427
) {
428428
for (Entry<String, String> param : headerParams.entrySet()) {
429-
reqBuilder.header(param.getKey(), parameterToString(param.getValue()));
429+
reqBuilder.header(
430+
param.getKey().toLowerCase(),
431+
parameterToString(param.getValue())
432+
);
430433
}
431434
for (Entry<String, String> header : defaultHeaderMap.entrySet()) {
432435
if (!headerParams.containsKey(header.getKey())) {
433436
reqBuilder.header(
434-
header.getKey(),
437+
header.getKey().toLowerCase(),
435438
parameterToString(header.getValue())
436439
);
437440
}
438441
}
439442
if (extraHeaderParams != null) {
440443
for (Entry<String, String> header : extraHeaderParams.entrySet()) {
441444
reqBuilder.header(
442-
header.getKey(),
445+
header.getKey().toLowerCase(),
443446
parameterToString(header.getValue())
444447
);
445448
}

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3024,15 +3024,15 @@ public CompletableFuture<SynonymHit> getSynonymAsync(
30243024
*/
30253025
public GetTaskResponse getTask(
30263026
String indexName,
3027-
Integer taskID,
3027+
Long taskID,
30283028
RequestOptions requestOptions
30293029
) throws AlgoliaRuntimeException {
30303030
return LaunderThrowable.await(
30313031
getTaskAsync(indexName, taskID, requestOptions)
30323032
);
30333033
}
30343034

3035-
public GetTaskResponse getTask(String indexName, Integer taskID)
3035+
public GetTaskResponse getTask(String indexName, Long taskID)
30363036
throws AlgoliaRuntimeException {
30373037
return this.getTask(indexName, taskID, null);
30383038
}
@@ -3050,7 +3050,7 @@ public GetTaskResponse getTask(String indexName, Integer taskID)
30503050
*/
30513051
public CompletableFuture<GetTaskResponse> getTaskAsync(
30523052
String indexName,
3053-
Integer taskID,
3053+
Long taskID,
30543054
RequestOptions requestOptions
30553055
) throws AlgoliaRuntimeException {
30563056
if (indexName == null) {
@@ -3093,7 +3093,7 @@ public CompletableFuture<GetTaskResponse> getTaskAsync(
30933093

30943094
public CompletableFuture<GetTaskResponse> getTaskAsync(
30953095
String indexName,
3096-
Integer taskID
3096+
Long taskID
30973097
) throws AlgoliaRuntimeException {
30983098
return this.getTaskAsync(indexName, taskID, null);
30993099
}

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ABTestResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class ABTestResponse {
1313
private Integer abTestID;
1414

1515
@SerializedName("taskID")
16-
private Integer taskID;
16+
private Long taskID;
1717

1818
public ABTestResponse setIndex(String index) {
1919
this.index = index;
@@ -45,7 +45,7 @@ public Integer getAbTestID() {
4545
return abTestID;
4646
}
4747

48-
public ABTestResponse setTaskID(Integer taskID) {
48+
public ABTestResponse setTaskID(Long taskID) {
4949
this.taskID = taskID;
5050
return this;
5151
}
@@ -56,7 +56,7 @@ public ABTestResponse setTaskID(Integer taskID) {
5656
* @return taskID
5757
*/
5858
@javax.annotation.Nonnull
59-
public Integer getTaskID() {
59+
public Long getTaskID() {
6060
return taskID;
6161
}
6262

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
public class BatchResponse {
1010

1111
@SerializedName("taskID")
12-
private Integer taskID;
12+
private Long taskID;
1313

1414
@SerializedName("objectIDs")
1515
private List<String> objectIDs = null;
1616

17-
public BatchResponse setTaskID(Integer taskID) {
17+
public BatchResponse setTaskID(Long taskID) {
1818
this.taskID = taskID;
1919
return this;
2020
}
@@ -25,7 +25,7 @@ public BatchResponse setTaskID(Integer taskID) {
2525
* @return taskID
2626
*/
2727
@javax.annotation.Nullable
28-
public Integer getTaskID() {
28+
public Long getTaskID() {
2929
return taskID;
3030
}
3131

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeletedAtResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
public class DeletedAtResponse {
88

99
@SerializedName("taskID")
10-
private Integer taskID;
10+
private Long taskID;
1111

1212
@SerializedName("deletedAt")
1313
private String deletedAt;
1414

15-
public DeletedAtResponse setTaskID(Integer taskID) {
15+
public DeletedAtResponse setTaskID(Long taskID) {
1616
this.taskID = taskID;
1717
return this;
1818
}
@@ -23,7 +23,7 @@ public DeletedAtResponse setTaskID(Integer taskID) {
2323
* @return taskID
2424
*/
2525
@javax.annotation.Nonnull
26-
public Integer getTaskID() {
26+
public Long getTaskID() {
2727
return taskID;
2828
}
2929

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveObjectResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class SaveObjectResponse {
1010
private String createdAt;
1111

1212
@SerializedName("taskID")
13-
private Integer taskID;
13+
private Long taskID;
1414

1515
@SerializedName("objectID")
1616
private String objectID;
@@ -30,7 +30,7 @@ public String getCreatedAt() {
3030
return createdAt;
3131
}
3232

33-
public SaveObjectResponse setTaskID(Integer taskID) {
33+
public SaveObjectResponse setTaskID(Long taskID) {
3434
this.taskID = taskID;
3535
return this;
3636
}
@@ -41,7 +41,7 @@ public SaveObjectResponse setTaskID(Integer taskID) {
4141
* @return taskID
4242
*/
4343
@javax.annotation.Nullable
44-
public Integer getTaskID() {
44+
public Long getTaskID() {
4545
return taskID;
4646
}
4747

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveSynonymResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
public class SaveSynonymResponse {
88

99
@SerializedName("taskID")
10-
private Integer taskID;
10+
private Long taskID;
1111

1212
@SerializedName("updatedAt")
1313
private String updatedAt;
1414

1515
@SerializedName("id")
1616
private String id;
1717

18-
public SaveSynonymResponse setTaskID(Integer taskID) {
18+
public SaveSynonymResponse setTaskID(Long taskID) {
1919
this.taskID = taskID;
2020
return this;
2121
}
@@ -26,7 +26,7 @@ public SaveSynonymResponse setTaskID(Integer taskID) {
2626
* @return taskID
2727
*/
2828
@javax.annotation.Nonnull
29-
public Integer getTaskID() {
29+
public Long getTaskID() {
3030
return taskID;
3131
}
3232

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
public class UpdatedAtResponse {
88

99
@SerializedName("taskID")
10-
private Integer taskID;
10+
private Long taskID;
1111

1212
@SerializedName("updatedAt")
1313
private String updatedAt;
1414

15-
public UpdatedAtResponse setTaskID(Integer taskID) {
15+
public UpdatedAtResponse setTaskID(Long taskID) {
1616
this.taskID = taskID;
1717
return this;
1818
}
@@ -23,7 +23,7 @@ public UpdatedAtResponse setTaskID(Integer taskID) {
2323
* @return taskID
2424
*/
2525
@javax.annotation.Nonnull
26-
public Integer getTaskID() {
26+
public Long getTaskID() {
2727
return taskID;
2828
}
2929

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtWithObjectIdResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
public class UpdatedAtWithObjectIdResponse {
88

99
@SerializedName("taskID")
10-
private Integer taskID;
10+
private Long taskID;
1111

1212
@SerializedName("updatedAt")
1313
private String updatedAt;
1414

1515
@SerializedName("objectID")
1616
private String objectID;
1717

18-
public UpdatedAtWithObjectIdResponse setTaskID(Integer taskID) {
18+
public UpdatedAtWithObjectIdResponse setTaskID(Long taskID) {
1919
this.taskID = taskID;
2020
return this;
2121
}
@@ -26,7 +26,7 @@ public UpdatedAtWithObjectIdResponse setTaskID(Integer taskID) {
2626
* @return taskID
2727
*/
2828
@javax.annotation.Nullable
29-
public Integer getTaskID() {
29+
public Long getTaskID() {
3030
return taskID;
3131
}
3232

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedRuleResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class UpdatedRuleResponse {
1313
private String updatedAt;
1414

1515
@SerializedName("taskID")
16-
private Integer taskID;
16+
private Long taskID;
1717

1818
public UpdatedRuleResponse setObjectID(String objectID) {
1919
this.objectID = objectID;
@@ -45,7 +45,7 @@ public String getUpdatedAt() {
4545
return updatedAt;
4646
}
4747

48-
public UpdatedRuleResponse setTaskID(Integer taskID) {
48+
public UpdatedRuleResponse setTaskID(Long taskID) {
4949
this.taskID = taskID;
5050
return this;
5151
}
@@ -56,7 +56,7 @@ public UpdatedRuleResponse setTaskID(Integer taskID) {
5656
* @return taskID
5757
*/
5858
@javax.annotation.Nonnull
59-
public Integer getTaskID() {
59+
public Long getTaskID() {
6060
return taskID;
6161
}
6262

clients/algoliasearch-client-java-2/gradlew

100644100755
File mode changed.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
rootProject.name = "algoliasearch-client-java-2"
1+
rootProject.name = "algoliasearch-client-java"
22

33
include(":algoliasearch-core")

clients/algoliasearch-client-php/lib/Api/SearchClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1899,7 +1899,7 @@ public function getSynonym($indexName, $objectID, $requestOptions = [])
18991899
* Check the status of a task.
19001900
*
19011901
* @param string $indexName The index in which to perform the request. (required)
1902-
* @param int $taskID Unique identifier of an task. Numeric value (up to 64bits). (required)
1902+
* @param array $taskID Unique identifier of an task. Numeric value (up to 64bits). (required)
19031903
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
19041904
*
19051905
* @return array<string, mixed>|\Algolia\AlgoliaSearch\Model\Search\GetTaskResponse

clients/algoliasearch-client-php/lib/Model/Abtesting/ABTestResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ABTestResponse extends \Algolia\AlgoliaSearch\Model\AbstractModel implemen
3232
protected static $modelFormats = [
3333
'index' => null,
3434
'abTestID' => null,
35-
'taskID' => null,
35+
'taskID' => 'int64',
3636
];
3737

3838
/**

clients/algoliasearch-client-php/lib/Model/Search/BatchResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class BatchResponse extends \Algolia\AlgoliaSearch\Model\AbstractModel implement
2929
* @var string[]
3030
*/
3131
protected static $modelFormats = [
32-
'taskID' => null,
32+
'taskID' => 'int64',
3333
'objectIDs' => null,
3434
];
3535

clients/algoliasearch-client-php/lib/Model/Search/DeletedAtResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DeletedAtResponse extends \Algolia\AlgoliaSearch\Model\AbstractModel imple
3131
* @var string[]
3232
*/
3333
protected static $modelFormats = [
34-
'taskID' => null,
34+
'taskID' => 'int64',
3535
'deletedAt' => null,
3636
];
3737

clients/algoliasearch-client-php/lib/Model/Search/SaveObjectResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class SaveObjectResponse extends \Algolia\AlgoliaSearch\Model\AbstractModel impl
3131
*/
3232
protected static $modelFormats = [
3333
'createdAt' => null,
34-
'taskID' => null,
34+
'taskID' => 'int64',
3535
'objectID' => null,
3636
];
3737

clients/algoliasearch-client-php/lib/Model/Search/SaveSynonymResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class SaveSynonymResponse extends \Algolia\AlgoliaSearch\Model\AbstractModel imp
3030
* @var string[]
3131
*/
3232
protected static $modelFormats = [
33-
'taskID' => null,
33+
'taskID' => 'int64',
3434
'updatedAt' => null,
3535
'id' => null,
3636
];

clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class UpdatedAtResponse extends \Algolia\AlgoliaSearch\Model\AbstractModel imple
3131
* @var string[]
3232
*/
3333
protected static $modelFormats = [
34-
'taskID' => null,
34+
'taskID' => 'int64',
3535
'updatedAt' => null,
3636
];
3737

clients/algoliasearch-client-php/lib/Model/Search/UpdatedAtWithObjectIdResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class UpdatedAtWithObjectIdResponse extends \Algolia\AlgoliaSearch\Model\Abstrac
3232
* @var string[]
3333
*/
3434
protected static $modelFormats = [
35-
'taskID' => null,
35+
'taskID' => 'int64',
3636
'updatedAt' => null,
3737
'objectID' => null,
3838
];

clients/algoliasearch-client-php/lib/Model/Search/UpdatedRuleResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class UpdatedRuleResponse extends \Algolia\AlgoliaSearch\Model\AbstractModel imp
3232
protected static $modelFormats = [
3333
'objectID' => null,
3434
'updatedAt' => null,
35-
'taskID' => null,
35+
'taskID' => 'int64',
3636
];
3737

3838
/**

clients/algoliasearch-client-php/lib/RequestOptions/RequestOptionsFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ private function normalize($options)
6464

6565
foreach ($options as $optionName => $value) {
6666
if (is_array($value)) {
67-
if ($optionName == 'headers') {
67+
if ($optionName === 'headers') {
6868
$headersToLowerCase = [];
6969

7070
foreach ($value as $key => $v) {
71-
$headersToLowerCase[strtolower($key)] = $v;
71+
$headersToLowerCase[mb_strtolower($key)] = $v;
7272
}
7373

7474
$normalized[$optionName] = $this->format(

0 commit comments

Comments
 (0)