Sandbox.Package/PackageInteraction Interaction { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Interaction property of the Package class provides information about the authenticated user's interactions with a specific package. This property is only available client-side for certain users. It is used to display details such as the user's play history, whether the package is marked as a favorite, and if the user has rated the package.

Usage

To access the Interaction property, you need to have an instance of the Package class. This property is particularly useful for client-side applications where you want to personalize the user experience based on their interactions with the package.

Example

// Assuming 'package' is an instance of Sandbox.Package
var userInteraction = package.Interaction;

// Check if the package is a favorite
bool isFavorite = userInteraction.IsFavorite;

// Get the user's play history
var playHistory = userInteraction.PlayHistory;

// Determine if the user has rated the package
bool hasRated = userInteraction.HasRated;