Package com.algolia.search
Class DefaultRecommendationClient
- java.lang.Object
-
- com.algolia.search.DefaultRecommendationClient
-
public class DefaultRecommendationClient extends Object
Algolia'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 DefaultRecommendationClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RecommendationClientcreate(RecommendationConfig config)Creates a defaultRecommendationClientwith the givenSearchConfig.static RecommendationClientcreate(String applicationID, String apiKey, String region)Creates aRecommendationClientwith the given credentials The default HttpClient implementation isApacheHttpRequester
-
-
-
Method Detail
-
create
public static RecommendationClient create(@Nonnull String applicationID, @Nonnull String apiKey, @Nonnull String region)
Creates aRecommendationClientwith the given credentials The default HttpClient implementation isApacheHttpRequester- Parameters:
applicationID- The Algolia Application IDapiKey- The Algolia API Keyregion- Region where your personalization data is stored and processed.- Throws:
NullPointerException- If one of the following ApplicationID/ApiKey is nullIllegalArgumentException- If the ApplicationID or the APIKey are empty
-
create
public static RecommendationClient create(@Nonnull RecommendationConfig config)
Creates a defaultRecommendationClientwith the givenSearchConfig. The default HttpClient implementation isApacheHttpRequester- Parameters:
config- The configuration allows you to advanced configuration of the clients such as batch size or custom hosts and timeout.- Throws:
NullPointerException- If one of the following ApplicationID/ApiKey/Config is nullIllegalArgumentException- If the ApplicationID or the APIKey are empty
-
-