Class GetPopularEntitiesRequest


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

    • GetPopularEntitiesRequest

      public GetPopularEntitiesRequest(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)
    • GetPopularEntitiesRequest

      public GetPopularEntitiesRequest(String behaviorType, String forUserId)
      Retrieve the globally most common entities 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.
    • GetPopularEntitiesRequest

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

    • forCurrentUser

      public static GetPopularEntitiesRequest forCurrentUser(String behaviorType, List<String> entityType)
      Creates a request to get the most popular 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 GetPopularEntitiesRequest for the current user.