Skip to content

Commit

Permalink
fix(specs): getObject return object (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3446

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Jul 30, 2024
1 parent 0021742 commit 959176d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions algoliasearch/Clients/SearchClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,8 @@ public interface ISearchClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Task of Dictionary{string, string}</returns>
Task<Dictionary<string, string>> GetObjectAsync(string indexName, string objectID, List<string> attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>Task of object</returns>
Task<object> GetObjectAsync(string indexName, string objectID, List<string> attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). (Synchronous version)
Expand All @@ -738,8 +738,8 @@ public interface ISearchClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Dictionary{string, string}</returns>
Dictionary<string, string> GetObject(string indexName, string objectID, List<string> attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>object</returns>
object GetObject(string indexName, string objectID, List<string> attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
Expand Down Expand Up @@ -2929,8 +2929,8 @@ public GetLogsResponse GetLogs(int? offset = default, int? length = default, str
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Task of Dictionary{string, string}</returns>
public async Task<Dictionary<string, string>> GetObjectAsync(string indexName, string objectID, List<string> attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default)
/// <returns>Task of object</returns>
public async Task<object> GetObjectAsync(string indexName, string objectID, List<string> attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default)
{

if (indexName == null)
Expand All @@ -2946,7 +2946,7 @@ public async Task<Dictionary<string, string>> GetObjectAsync(string indexName, s
requestOptions.PathParameters.Add("objectID", QueryStringHelper.ParameterToString(objectID));

requestOptions.AddQueryParameter("attributesToRetrieve", attributesToRetrieve);
return await _transport.ExecuteRequestAsync<Dictionary<string, string>>(new HttpMethod("GET"), "/1/indexes/{indexName}/{objectID}", requestOptions, cancellationToken).ConfigureAwait(false);
return await _transport.ExecuteRequestAsync<object>(new HttpMethod("GET"), "/1/indexes/{indexName}/{objectID}", requestOptions, cancellationToken).ConfigureAwait(false);
}


Expand All @@ -2964,8 +2964,8 @@ public async Task<Dictionary<string, string>> GetObjectAsync(string indexName, s
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Dictionary{string, string}</returns>
public Dictionary<string, string> GetObject(string indexName, string objectID, List<string> attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
/// <returns>object</returns>
public object GetObject(string indexName, string objectID, List<string> attributesToRetrieve = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
AsyncHelper.RunSync(() => GetObjectAsync(indexName, objectID, attributesToRetrieve, options, cancellationToken));


Expand Down

0 comments on commit 959176d

Please sign in to comment.