Skip to content

Commit 06dce8d

Browse files
committed
Add ability to update collections
1 parent 8b0852d commit 06dce8d

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ Here are some examples that walk you through how to use the client: [doc/example
2121
## Compatibility
2222

2323
| Typesense Server | typesense-php |
24-
|------------------|----------------|
25-
| \>= v0.21.0 | \>= v4.7.0 |
26-
| \>= v0.20.0 | \>= v4.6.0 |
27-
| \>= v0.19.0 | \>= v4.5.0 |
28-
| \>= v0.18.0 | \>= v4.4.0 |
29-
| \>= v0.17.0 | \>= v4.2.0 |
30-
| \>= v0.16.0 | \>= v4.1.0 |
31-
| \>= v0.15.0 | \>= v4.0.0 |
24+
|------------------|---------------|
25+
| \>= v0.23.0 | \>= v4.8.0 |
26+
| \>= v0.21.0 | \>= v4.7.0 |
27+
| \>= v0.20.0 | \>= v4.6.0 |
28+
| \>= v0.19.0 | \>= v4.5.0 |
29+
| \>= v0.18.0 | \>= v4.4.0 |
30+
| \>= v0.17.0 | \>= v4.2.0 |
31+
| \>= v0.16.0 | \>= v4.1.0 |
32+
| \>= v0.15.0 | \>= v4.0.0 |
3233

3334
## Contributing
3435

src/Collection.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ public function retrieve(): array
9696
return $this->apiCall->get($this->endPointPath(), []);
9797
}
9898

99+
/**
100+
* @param array $schema
101+
*
102+
* @return array
103+
* @throws TypesenseClientError|HttpClientException
104+
*/
105+
public function update(array $schema): array
106+
{
107+
return $this->apiCall->patch($this->endPointPath(), $schema);
108+
}
109+
99110
/**
100111
* @return array
101112
* @throws TypesenseClientError|HttpClientException

0 commit comments

Comments
 (0)