Class DefaultRecommendClient


  • public class DefaultRecommendClient
    extends Object
    Algolia's REST recommend client that wraps an instance of the transporter HttpTransport 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 RecommendClient create​(@Nonnull
                                             String applicationID,
                                             @Nonnull
                                             String apiKey)
        Creates a RecommendClient 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 RecommendClient create​(@Nonnull
                                             SearchConfig config)
        Creates a default RecommendClient with the given SearchConfig. The default HttpClient implementation is ApacheHttpRequester
        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 null
        IllegalArgumentException - If the ApplicationID or the APIKey are empty