|
7 | 7 | use Algolia\AlgoliaSearch\Algolia;
|
8 | 8 | use Algolia\AlgoliaSearch\Configuration\SearchConfig;
|
9 | 9 | use Algolia\AlgoliaSearch\Exceptions\ExceededRetriesException;
|
| 10 | +use Algolia\AlgoliaSearch\Iterators\ObjectIterator; |
| 11 | +use Algolia\AlgoliaSearch\Iterators\RuleIterator; |
| 12 | +use Algolia\AlgoliaSearch\Iterators\SynonymIterator; |
10 | 13 | use Algolia\AlgoliaSearch\ObjectSerializer;
|
11 | 14 | use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper;
|
12 | 15 | use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapperInterface;
|
@@ -3151,6 +3154,45 @@ public function waitForApiKey(
|
3151 | 3154 | );
|
3152 | 3155 | }
|
3153 | 3156 |
|
| 3157 | + /** |
| 3158 | + * Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index. |
| 3159 | + * |
| 3160 | + * @param string $indexName Index name |
| 3161 | + * @param array $requestOptions Request options |
| 3162 | + * |
| 3163 | + * @return ObjectIterator |
| 3164 | + */ |
| 3165 | + public function browseObjects($indexName, $requestOptions = []) |
| 3166 | + { |
| 3167 | + return new ObjectIterator($indexName, $this, $requestOptions); |
| 3168 | + } |
| 3169 | + |
| 3170 | + /** |
| 3171 | + * Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index. |
| 3172 | + * |
| 3173 | + * @param string $indexName Index name |
| 3174 | + * @param array $requestOptions Request options |
| 3175 | + * |
| 3176 | + * @return RuleIterator |
| 3177 | + */ |
| 3178 | + public function browseRules($indexName, $requestOptions = []) |
| 3179 | + { |
| 3180 | + return new RuleIterator($indexName, $this, $requestOptions); |
| 3181 | + } |
| 3182 | + |
| 3183 | + /** |
| 3184 | + * Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating synonyms of an index. |
| 3185 | + * |
| 3186 | + * @param string $indexName Index name |
| 3187 | + * @param array $requestOptions Request options |
| 3188 | + * |
| 3189 | + * @return SynonymIterator |
| 3190 | + */ |
| 3191 | + public function browseSynonyms($indexName, $requestOptions = []) |
| 3192 | + { |
| 3193 | + return new SynonymIterator($indexName, $this, $requestOptions); |
| 3194 | + } |
| 3195 | + |
3154 | 3196 | private function sendRequest(
|
3155 | 3197 | $method,
|
3156 | 3198 | $resourcePath,
|
|
0 commit comments