Class PersonalizationClient

java.lang.Object
com.algolia.ApiClient
com.algolia.api.PersonalizationClient

public class PersonalizationClient extends ApiClient
  • Constructor Details

  • Method Details

    • del

      public Object del(String path, Map<String,Object> parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • del

      public Object del(String path, Map<String,Object> parameters) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • del

      public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • del

      public Object del(String path) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • delAsync

      public CompletableFuture<Object> delAsync(String path, Map<String,Object> parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • delAsync

      public CompletableFuture<Object> delAsync(String path, Map<String,Object> parameters) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • delAsync

      public CompletableFuture<Object> delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • delAsync

      public CompletableFuture<Object> delAsync(String path) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • deleteUserProfile

      public DeleteUserProfileResponse deleteUserProfile(String userToken, RequestOptions requestOptions) throws AlgoliaRuntimeException
      Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
      Parameters:
      userToken - userToken representing the user for which to fetch the Personalization profile. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      DeleteUserProfileResponse
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • deleteUserProfile

      public DeleteUserProfileResponse deleteUserProfile(String userToken) throws AlgoliaRuntimeException
      Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
      Parameters:
      userToken - userToken representing the user for which to fetch the Personalization profile. (required)
      Returns:
      DeleteUserProfileResponse
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • deleteUserProfileAsync

      public CompletableFuture<DeleteUserProfileResponse> deleteUserProfileAsync(String userToken, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
      Parameters:
      userToken - userToken representing the user for which to fetch the Personalization profile. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • deleteUserProfileAsync

      public CompletableFuture<DeleteUserProfileResponse> deleteUserProfileAsync(String userToken) throws AlgoliaRuntimeException
      (asynchronously) Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
      Parameters:
      userToken - userToken representing the user for which to fetch the Personalization profile. (required)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • get

      public Object get(String path, Map<String,Object> parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • get

      public Object get(String path, Map<String,Object> parameters) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • get

      public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • get

      public Object get(String path) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getAsync

      public CompletableFuture<Object> getAsync(String path, Map<String,Object> parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getAsync

      public CompletableFuture<Object> getAsync(String path, Map<String,Object> parameters) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getAsync

      public CompletableFuture<Object> getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getAsync

      public CompletableFuture<Object> getAsync(String path) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getPersonalizationStrategy

      public PersonalizationStrategyParams getPersonalizationStrategy(RequestOptions requestOptions) throws AlgoliaRuntimeException
      The strategy contains information on the events and facets that impact user profiles and personalized search results.
      Parameters:
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      PersonalizationStrategyParams
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getPersonalizationStrategy

      public PersonalizationStrategyParams getPersonalizationStrategy() throws AlgoliaRuntimeException
      The strategy contains information on the events and facets that impact user profiles and personalized search results.
      Returns:
      PersonalizationStrategyParams
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getPersonalizationStrategyAsync

      public CompletableFuture<PersonalizationStrategyParams> getPersonalizationStrategyAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) The strategy contains information on the events and facets that impact user profiles and personalized search results.
      Parameters:
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getPersonalizationStrategyAsync

      public CompletableFuture<PersonalizationStrategyParams> getPersonalizationStrategyAsync() throws AlgoliaRuntimeException
      (asynchronously) The strategy contains information on the events and facets that impact user profiles and personalized search results.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getUserTokenProfile

      public GetUserTokenResponse getUserTokenProfile(String userToken, RequestOptions requestOptions) throws AlgoliaRuntimeException
      Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
      Parameters:
      userToken - userToken representing the user for which to fetch the Personalization profile. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      GetUserTokenResponse
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getUserTokenProfile

      public GetUserTokenResponse getUserTokenProfile(String userToken) throws AlgoliaRuntimeException
      Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
      Parameters:
      userToken - userToken representing the user for which to fetch the Personalization profile. (required)
      Returns:
      GetUserTokenResponse
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getUserTokenProfileAsync

      public CompletableFuture<GetUserTokenResponse> getUserTokenProfileAsync(String userToken, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
      Parameters:
      userToken - userToken representing the user for which to fetch the Personalization profile. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • getUserTokenProfileAsync

      public CompletableFuture<GetUserTokenResponse> getUserTokenProfileAsync(String userToken) throws AlgoliaRuntimeException
      (asynchronously) Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
      Parameters:
      userToken - userToken representing the user for which to fetch the Personalization profile. (required)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • post

      public Object post(String path, Map<String,Object> parameters, Object body, RequestOptions requestOptions) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      body - Parameters to send with the custom request. (optional)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • post

      public Object post(String path, Map<String,Object> parameters, Object body) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      body - Parameters to send with the custom request. (optional)
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • post

      public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • post

      public Object post(String path) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • postAsync

      public CompletableFuture<Object> postAsync(String path, Map<String,Object> parameters, Object body, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      body - Parameters to send with the custom request. (optional)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • postAsync

      public CompletableFuture<Object> postAsync(String path, Map<String,Object> parameters, Object body) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      body - Parameters to send with the custom request. (optional)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • postAsync

      public CompletableFuture<Object> postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • postAsync

      public CompletableFuture<Object> postAsync(String path) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • put

      public Object put(String path, Map<String,Object> parameters, Object body, RequestOptions requestOptions) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      body - Parameters to send with the custom request. (optional)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • put

      public Object put(String path, Map<String,Object> parameters, Object body) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      body - Parameters to send with the custom request. (optional)
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • put

      public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • put

      public Object put(String path) throws AlgoliaRuntimeException
      This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      Returns:
      Object
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • putAsync

      public CompletableFuture<Object> putAsync(String path, Map<String,Object> parameters, Object body, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      body - Parameters to send with the custom request. (optional)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • putAsync

      public CompletableFuture<Object> putAsync(String path, Map<String,Object> parameters, Object body) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      parameters - Query parameters to apply to the current query. (optional)
      body - Parameters to send with the custom request. (optional)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • putAsync

      public CompletableFuture<Object> putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • putAsync

      public CompletableFuture<Object> putAsync(String path) throws AlgoliaRuntimeException
      (asynchronously) This method allow you to send requests to the Algolia REST API.
      Parameters:
      path - Path of the endpoint, anything after \"/1\" must be specified. (required)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • setPersonalizationStrategy

      public SetPersonalizationStrategyResponse setPersonalizationStrategy(PersonalizationStrategyParams personalizationStrategyParams, RequestOptions requestOptions) throws AlgoliaRuntimeException
      A strategy defines the events and facets that impact user profiles and personalized search results.
      Parameters:
      personalizationStrategyParams - (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      SetPersonalizationStrategyResponse
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • setPersonalizationStrategy

      public SetPersonalizationStrategyResponse setPersonalizationStrategy(PersonalizationStrategyParams personalizationStrategyParams) throws AlgoliaRuntimeException
      A strategy defines the events and facets that impact user profiles and personalized search results.
      Parameters:
      personalizationStrategyParams - (required)
      Returns:
      SetPersonalizationStrategyResponse
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • setPersonalizationStrategyAsync

      public CompletableFuture<SetPersonalizationStrategyResponse> setPersonalizationStrategyAsync(PersonalizationStrategyParams personalizationStrategyParams, RequestOptions requestOptions) throws AlgoliaRuntimeException
      (asynchronously) A strategy defines the events and facets that impact user profiles and personalized search results.
      Parameters:
      personalizationStrategyParams - (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call
    • setPersonalizationStrategyAsync

      public CompletableFuture<SetPersonalizationStrategyResponse> setPersonalizationStrategyAsync(PersonalizationStrategyParams personalizationStrategyParams) throws AlgoliaRuntimeException
      (asynchronously) A strategy defines the events and facets that impact user profiles and personalized search results.
      Parameters:
      personalizationStrategyParams - (required)
      Returns:
      CompletableFuture The awaitable future
      Throws:
      AlgoliaRuntimeException - If it fails to process the API call