Package com.algolia.search
Class DefaultAnalyticsClient
- java.lang.Object
-
- com.algolia.search.DefaultAnalyticsClient
-
public class DefaultAnalyticsClient extends Object
Algolia's REST analytics 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 DefaultAnalyticsClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AnalyticsClientcreate(AnalyticsConfig config)Creates a defaultAnalyticsClientwith the givenAnalyticsConfig.static AnalyticsClientcreate(String applicationID, String apiKey)Creates a defaultAnalyticsClientwith the given credentials.static AnalyticsClientcreate(String applicationID, String apiKey, String region)Creates a defaultAnalyticsClientwith the given credentials.
-
-
-
Method Detail
-
create
public static AnalyticsClient create(@Nonnull String applicationID, @Nonnull String apiKey)
Creates a defaultAnalyticsClientwith 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 AnalyticsClient create(@Nonnull String applicationID, @Nonnull String apiKey, @Nonnull String region)
Creates a defaultAnalyticsClientwith the given credentials. The default HttpClient implementation isApacheHttpRequester- Parameters:
applicationID- The Algolia Application IDapiKey- The Algolia API Keyregion- The region of the Analytics cluster- Throws:
NullPointerException- If one of the following ApplicationID/ApiKey is nullIllegalArgumentException- If the ApplicationID or the APIKey are empty
-
create
public static AnalyticsClient create(@Nonnull AnalyticsConfig config)
Creates a defaultAnalyticsClientwith the givenAnalyticsConfig. 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
-
-