Class 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
    • Method Detail

      • create

        public static AnalyticsClient create​(@Nonnull
                                             String applicationID,
                                             @Nonnull
                                             String apiKey)
        Creates a default AnalyticsClient with the given credentials. The default HttpClient implementation is ApacheHttpRequester
        Parameters:
        applicationID - The Algolia Application ID
        apiKey - The Algolia API Key
        Throws:
        NullPointerException - If one of the following ApplicationID/ApiKey is null
        IllegalArgumentException - If the ApplicationID or the APIKey are empty
      • create

        public static AnalyticsClient create​(@Nonnull
                                             String applicationID,
                                             @Nonnull
                                             String apiKey,
                                             @Nonnull
                                             String region)
        Creates a default AnalyticsClient with the given credentials. The default HttpClient implementation is ApacheHttpRequester
        Parameters:
        applicationID - The Algolia Application ID
        apiKey - The Algolia API Key
        region - The region of the Analytics cluster
        Throws:
        NullPointerException - If one of the following ApplicationID/ApiKey is null
        IllegalArgumentException - If the ApplicationID or the APIKey are empty