Package com.algolia.search
Class DefaultRecommendClient
- java.lang.Object
-
- com.algolia.search.DefaultRecommendClient
-
public class DefaultRecommendClient extends Object
Algolia's REST recommend 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
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RecommendClientcreate(SearchConfig config)Creates a defaultRecommendClientwith the givenSearchConfig.static RecommendClientcreate(String applicationID, String apiKey)Creates aRecommendClientwith the given credentials The default HttpClient implementation isApacheHttpRequester
-
-
-
Method Detail
-
create
public static RecommendClient create(@Nonnull String applicationID, @Nonnull String apiKey)
Creates aRecommendClientwith the given credentials The default HttpClient implementation isApacheHttpRequester- Parameters:
applicationID- The Algolia Application IDapiKey- The Algolia API Key- Throws:
NullPointerException- If one of the following ApplicationID/ApiKey is nullIllegalArgumentException- If the ApplicationID or the APIKey are empty
-
create
public static RecommendClient create(@Nonnull SearchConfig config)
Creates a defaultRecommendClientwith 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
-
-