Class GetRecentEntitiesRequest


public class GetRecentEntitiesRequest extends GetPopularOrRecentEntitiesRequest
This class used to perform a request to get entities that a user (or all users) most recently interacted with or navigated to.
  • Constructor Details

    • GetRecentEntitiesRequest

      public GetRecentEntitiesRequest(String behaviorType, String forUserId, List<String> entityType)
      Parameters:
      behaviorType - interaction or navigation type to include (such as click, purchase or search).
      forUserId - a user ID to retrieve the most common/recent entities for that user or null to retrieve the globally most common/recent entities. GetPopularOrRecentEntitiesRequest.CURRENT_USER_PLACEHOLDER can be specified to use the user ID from the User-Id request header.
      entityType - entity types to include (such as Product or Query)
    • GetRecentEntitiesRequest

      public GetRecentEntitiesRequest(String behaviorType, String forUserId)
      Retrieve the globally most recent products for a specfic user
      Parameters:
      behaviorType - interaction or navigation type to include (such as click, purchase or search).
      forUserId - a user ID to retrieve the most common/recent entities for that user or null to retrieve the globally most common/recent entities. GetPopularOrRecentEntitiesRequest.CURRENT_USER_PLACEHOLDER can be specified to use the user ID from the User-Id request header.
    • GetRecentEntitiesRequest

      public GetRecentEntitiesRequest(String behaviorType)
      Retrieve the globally most recent products
      Parameters:
      behaviorType - interaction or navigation type to include (such as click, purchase or search).
  • Method Details

    • forCurrentUser

      public static GetRecentEntitiesRequest forCurrentUser(String behaviorType, List<String> entityType)
      Creates a request to get the most recent entities for the current user.
      Parameters:
      behaviorType - interaction or navigation type to include (such as click, purchase, or search).
      entityType - entity types to include (such as Product or Query).
      Returns:
      a new instance of GetRecentEntitiesRequest for the current user.