Package com.algolia.search
Class DefaultInsightsClient
- java.lang.Object
-
- com.algolia.search.DefaultInsightsClient
-
public class DefaultInsightsClient extends Object
Algolia's REST insights client that wraps an instance of the transporter. which 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 DefaultInsightsClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InsightsClientcreate(InsightsConfig config)Creates a defaultInsightsClientwith the givenInsightsConfig.static InsightsClientcreate(String applicationID, String apiKey)Creates a defaultInsightsClientwith the given credentials.
-
-
-
Method Detail
-
create
public static InsightsClient create(@Nonnull String applicationID, @Nonnull String apiKey)
Creates a defaultInsightsClientwith 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 InsightsClient create(@Nonnull InsightsConfig config)
Creates a defaultInsightsClientwith the givenInsightsConfig. 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
-
-