Skip to content

Commit a4e3eec

Browse files
algolia-botmillotp
andcommitted
fix(csharp): add helpers to ISearchClient (#3657) (generated) [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent 8c717c1 commit a4e3eec

File tree

11 files changed

+1491
-5773
lines changed

11 files changed

+1491
-5773
lines changed

clients/algoliasearch-client-csharp/algoliasearch/Algolia.Search.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<ItemGroup>
4040
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
4141
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
42-
<PackageReference Include="System.Text.Json" Version="8.0.2" />
42+
<PackageReference Include="System.Text.Json" Version="8.0.4" />
4343
</ItemGroup>
4444

4545
<ItemGroup>
@@ -55,4 +55,4 @@
5555
</Content>
5656
</ItemGroup>
5757

58-
</Project>
58+
</Project>

clients/algoliasearch-client-csharp/algoliasearch/Clients/AbtestingClient.cs

Lines changed: 56 additions & 255 deletions
Large diffs are not rendered by default.

clients/algoliasearch-client-csharp/algoliasearch/Clients/AnalyticsClient.cs

Lines changed: 168 additions & 781 deletions
Large diffs are not rendered by default.

clients/algoliasearch-client-csharp/algoliasearch/Clients/IngestionClient.cs

Lines changed: 598 additions & 1793 deletions
Large diffs are not rendered by default.

clients/algoliasearch-client-csharp/algoliasearch/Clients/InsightsClient.cs

Lines changed: 12 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,7 @@ public InsightsClient(InsightsConfig config, IHttpRequester httpRequester, ILogg
245245
}
246246

247247

248-
/// <summary>
249-
/// This method allow you to send requests to the Algolia REST API.
250-
/// </summary>
251-
/// <param name="path">Path of the endpoint, anything after \&quot;/1\&quot; must be specified.</param>
252-
/// <param name="parameters">Query parameters to apply to the current query. (optional)</param>
253-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
254-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
255-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
256-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
257-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
258-
/// <returns>Task of object</returns>
248+
/// <inheritdoc />
259249
public async Task<object> CustomDeleteAsync(string path, Dictionary<string, object> parameters = default, RequestOptions options = null, CancellationToken cancellationToken = default)
260250
{
261251

@@ -270,32 +260,12 @@ public async Task<object> CustomDeleteAsync(string path, Dictionary<string, obje
270260
}
271261

272262

273-
/// <summary>
274-
/// This method allow you to send requests to the Algolia REST API. (Synchronous version)
275-
/// </summary>
276-
/// <param name="path">Path of the endpoint, anything after \&quot;/1\&quot; must be specified.</param>
277-
/// <param name="parameters">Query parameters to apply to the current query. (optional)</param>
278-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
279-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
280-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
281-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
282-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
283-
/// <returns>object</returns>
263+
/// <inheritdoc />
284264
public object CustomDelete(string path, Dictionary<string, object> parameters = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
285265
AsyncHelper.RunSync(() => CustomDeleteAsync(path, parameters, options, cancellationToken));
286266

287267

288-
/// <summary>
289-
/// This method allow you to send requests to the Algolia REST API.
290-
/// </summary>
291-
/// <param name="path">Path of the endpoint, anything after \&quot;/1\&quot; must be specified.</param>
292-
/// <param name="parameters">Query parameters to apply to the current query. (optional)</param>
293-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
294-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
295-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
296-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
297-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
298-
/// <returns>Task of object</returns>
268+
/// <inheritdoc />
299269
public async Task<object> CustomGetAsync(string path, Dictionary<string, object> parameters = default, RequestOptions options = null, CancellationToken cancellationToken = default)
300270
{
301271

@@ -310,33 +280,12 @@ public async Task<object> CustomGetAsync(string path, Dictionary<string, object>
310280
}
311281

312282

313-
/// <summary>
314-
/// This method allow you to send requests to the Algolia REST API. (Synchronous version)
315-
/// </summary>
316-
/// <param name="path">Path of the endpoint, anything after \&quot;/1\&quot; must be specified.</param>
317-
/// <param name="parameters">Query parameters to apply to the current query. (optional)</param>
318-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
319-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
320-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
321-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
322-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
323-
/// <returns>object</returns>
283+
/// <inheritdoc />
324284
public object CustomGet(string path, Dictionary<string, object> parameters = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
325285
AsyncHelper.RunSync(() => CustomGetAsync(path, parameters, options, cancellationToken));
326286

327287

328-
/// <summary>
329-
/// This method allow you to send requests to the Algolia REST API.
330-
/// </summary>
331-
/// <param name="path">Path of the endpoint, anything after \&quot;/1\&quot; must be specified.</param>
332-
/// <param name="parameters">Query parameters to apply to the current query. (optional)</param>
333-
/// <param name="body">Parameters to send with the custom request. (optional)</param>
334-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
335-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
336-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
337-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
338-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
339-
/// <returns>Task of object</returns>
288+
/// <inheritdoc />
340289
public async Task<object> CustomPostAsync(string path, Dictionary<string, object> parameters = default, object body = default, RequestOptions options = null, CancellationToken cancellationToken = default)
341290
{
342291

@@ -352,34 +301,12 @@ public async Task<object> CustomPostAsync(string path, Dictionary<string, object
352301
}
353302

354303

355-
/// <summary>
356-
/// This method allow you to send requests to the Algolia REST API. (Synchronous version)
357-
/// </summary>
358-
/// <param name="path">Path of the endpoint, anything after \&quot;/1\&quot; must be specified.</param>
359-
/// <param name="parameters">Query parameters to apply to the current query. (optional)</param>
360-
/// <param name="body">Parameters to send with the custom request. (optional)</param>
361-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
362-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
363-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
364-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
365-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
366-
/// <returns>object</returns>
304+
/// <inheritdoc />
367305
public object CustomPost(string path, Dictionary<string, object> parameters = default, object body = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
368306
AsyncHelper.RunSync(() => CustomPostAsync(path, parameters, body, options, cancellationToken));
369307

370308

371-
/// <summary>
372-
/// This method allow you to send requests to the Algolia REST API.
373-
/// </summary>
374-
/// <param name="path">Path of the endpoint, anything after \&quot;/1\&quot; must be specified.</param>
375-
/// <param name="parameters">Query parameters to apply to the current query. (optional)</param>
376-
/// <param name="body">Parameters to send with the custom request. (optional)</param>
377-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
378-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
379-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
380-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
381-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
382-
/// <returns>Task of object</returns>
309+
/// <inheritdoc />
383310
public async Task<object> CustomPutAsync(string path, Dictionary<string, object> parameters = default, object body = default, RequestOptions options = null, CancellationToken cancellationToken = default)
384311
{
385312

@@ -395,32 +322,12 @@ public async Task<object> CustomPutAsync(string path, Dictionary<string, object>
395322
}
396323

397324

398-
/// <summary>
399-
/// This method allow you to send requests to the Algolia REST API. (Synchronous version)
400-
/// </summary>
401-
/// <param name="path">Path of the endpoint, anything after \&quot;/1\&quot; must be specified.</param>
402-
/// <param name="parameters">Query parameters to apply to the current query. (optional)</param>
403-
/// <param name="body">Parameters to send with the custom request. (optional)</param>
404-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
405-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
406-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
407-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
408-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
409-
/// <returns>object</returns>
325+
/// <inheritdoc />
410326
public object CustomPut(string path, Dictionary<string, object> parameters = default, object body = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
411327
AsyncHelper.RunSync(() => CustomPutAsync(path, parameters, body, options, cancellationToken));
412328

413329

414-
/// <summary>
415-
/// Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API.
416-
/// </summary>
417-
/// <param name="userToken">User token for which to delete all associated events.</param>
418-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
419-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
420-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
421-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
422-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
423-
/// <returns>Task of </returns>
330+
/// <inheritdoc />
424331
public async Task DeleteUserTokenAsync(string userToken, RequestOptions options = null, CancellationToken cancellationToken = default)
425332
{
426333

@@ -435,30 +342,12 @@ public async Task DeleteUserTokenAsync(string userToken, RequestOptions options
435342
}
436343

437344

438-
/// <summary>
439-
/// Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API. (Synchronous version)
440-
/// </summary>
441-
/// <param name="userToken">User token for which to delete all associated events.</param>
442-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
443-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
444-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
445-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
446-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
447-
/// <returns> </returns>
345+
/// <inheritdoc />
448346
public void DeleteUserToken(string userToken, RequestOptions options = null, CancellationToken cancellationToken = default) =>
449347
AsyncHelper.RunSync(() => DeleteUserTokenAsync(userToken, options, cancellationToken));
450348

451349

452-
/// <summary>
453-
/// Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&nbsp;MB.
454-
/// </summary>
455-
/// <param name="insightsEvents"></param>
456-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
457-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
458-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
459-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
460-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
461-
/// <returns>Task of EventsResponse</returns>
350+
/// <inheritdoc />
462351
public async Task<EventsResponse> PushEventsAsync(InsightsEvents insightsEvents, RequestOptions options = null, CancellationToken cancellationToken = default)
463352
{
464353

@@ -473,18 +362,8 @@ public async Task<EventsResponse> PushEventsAsync(InsightsEvents insightsEvents,
473362
}
474363

475364

476-
/// <summary>
477-
/// Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&nbsp;MB. (Synchronous version)
478-
/// </summary>
479-
/// <param name="insightsEvents"></param>
480-
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
481-
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
482-
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
483-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
484-
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
485-
/// <returns>EventsResponse</returns>
365+
/// <inheritdoc />
486366
public EventsResponse PushEvents(InsightsEvents insightsEvents, RequestOptions options = null, CancellationToken cancellationToken = default) =>
487367
AsyncHelper.RunSync(() => PushEventsAsync(insightsEvents, options, cancellationToken));
488368

489369
}
490-

0 commit comments

Comments
 (0)