using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using RudderSdk.Core.Models.Inventory; namespace RudderSdk.Core; /// Player inventory. public sealed class InventoryService { private readonly RudderClient _client; internal InventoryService(RudderClient client) => _client = client; /// Lists the items the player owns. public async Task> GetAsync(CancellationToken cancellationToken = default) { var response = await _client.SendAsync( "GET", "/sdk/v1/inventory", cancellationToken).ConfigureAwait(false); return response?.Items ?? new List(); } }