Package com.algolia.search
Class RecommendationClient
- java.lang.Object
-
- com.algolia.search.RecommendationClient
-
- All Implemented Interfaces:
Closeable,AutoCloseable
@Deprecated public class RecommendationClient extends Object implements Closeable
Deprecated.usePersonalizationClientinsteadAlgolia's REST recommendation client that wraps an instance of the transporterHttpTransportwhich wraps the HTTP Client This client allows to build typed requests and read typed responses. Requests are made under the Algolia's retry-strategy. This client is intended to be reused and it's thread-safe.- See Also:
- Algolia.com
-
-
Constructor Summary
Constructors Constructor Description RecommendationClient(RecommendationConfig config, HttpRequester httpRequester)Deprecated.Creates a customRecommendationClientwith the givenRecommendationConfigand the givenHttpRequester
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.Close the underlying Http ClientConfigBasegetConfig()Deprecated.Get Client's configurationGetStrategyResponsegetPersonalizationStrategy()Deprecated.Returns the personalization strategy of the applicationGetStrategyResponsegetPersonalizationStrategy(RequestOptions requestOptions)Deprecated.Returns the personalization strategy of the applicationCompletableFuture<GetStrategyResponse>getPersonalizationStrategyAsync()Deprecated.Returns the personalization strategy of the applicationCompletableFuture<GetStrategyResponse>getPersonalizationStrategyAsync(RequestOptions requestOptions)Deprecated.Returns the personalization strategy of the applicationSetStrategyResponsesetPersonalizationStrategy(SetStrategyRequest request)Deprecated.This command configures the personalization strategySetStrategyResponsesetPersonalizationStrategy(SetStrategyRequest request, RequestOptions requestOptions)Deprecated.This command configures the personalization strategyCompletableFuture<SetStrategyResponse>setPersonalizationStrategyAsync(SetStrategyRequest request)Deprecated.This command configures the personalization strategyCompletableFuture<SetStrategyResponse>setPersonalizationStrategyAsync(SetStrategyRequest request, RequestOptions requestOptions)Deprecated.This command configures the personalization strategy
-
-
-
Constructor Detail
-
RecommendationClient
public RecommendationClient(@Nonnull RecommendationConfig config, @Nonnull HttpRequester httpRequester)
Deprecated.Creates a customRecommendationClientwith the givenRecommendationConfigand the givenHttpRequester- Parameters:
config- The configuration allows you to advanced configuration of the clients such as batch size or custom hosts and timeout.httpRequester- Another HTTP Client than the default one. Must be an implementation ofHttpRequester.- Throws:
NullPointerException- If one of the following ApplicationID/ApiKey/Configuration/Requester is nullIllegalArgumentException- If the ApplicationID or the APIKey are empty
-
-
Method Detail
-
close
public void close() throws IOExceptionDeprecated.Close the underlying Http Client- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- if an I/O error occurs
-
getPersonalizationStrategy
public GetStrategyResponse getPersonalizationStrategy()
Deprecated.Returns the personalization strategy of the application- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
getPersonalizationStrategy
public GetStrategyResponse getPersonalizationStrategy(RequestOptions requestOptions)
Deprecated.Returns the personalization strategy of the application- Parameters:
requestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
getPersonalizationStrategyAsync
public CompletableFuture<GetStrategyResponse> getPersonalizationStrategyAsync()
Deprecated.Returns the personalization strategy of the application- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
getPersonalizationStrategyAsync
public CompletableFuture<GetStrategyResponse> getPersonalizationStrategyAsync(RequestOptions requestOptions)
Deprecated.Returns the personalization strategy of the application- Parameters:
requestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
setPersonalizationStrategy
public SetStrategyResponse setPersonalizationStrategy(@Nonnull SetStrategyRequest request)
Deprecated.This command configures the personalization strategy- Parameters:
request- The personalization strategy- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
setPersonalizationStrategy
public SetStrategyResponse setPersonalizationStrategy(@Nonnull SetStrategyRequest request, RequestOptions requestOptions)
Deprecated.This command configures the personalization strategy- Parameters:
request- The personalization strategyrequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
setPersonalizationStrategyAsync
public CompletableFuture<SetStrategyResponse> setPersonalizationStrategyAsync(@Nonnull SetStrategyRequest request)
Deprecated.This command configures the personalization strategy- Parameters:
request- The personalization strategy- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
setPersonalizationStrategyAsync
public CompletableFuture<SetStrategyResponse> setPersonalizationStrategyAsync(@Nonnull SetStrategyRequest request, RequestOptions requestOptions)
Deprecated.This command configures the personalization strategy- Parameters:
request- The personalization strategyrequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
getConfig
public ConfigBase getConfig()
Deprecated.Get Client's configuration
-
-