Initial commit

This commit is contained in:
rudder
2026-08-12 14:04:55 +03:00
commit 8cf738d9f0
124 changed files with 5433 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using RudderSdk.Core.Models.Inventory;
namespace RudderSdk.Core;
/// <summary>Player inventory.</summary>
public sealed class InventoryService
{
private readonly RudderClient _client;
internal InventoryService(RudderClient client) => _client = client;
/// <summary>Lists the items the player owns.</summary>
public async Task<IReadOnlyList<PlayerInventoryItem>> GetAsync(CancellationToken cancellationToken = default)
{
var response = await _client.SendAsync<GetInventoryResponse>(
"GET",
"/sdk/v1/inventory",
cancellationToken).ConfigureAwait(false);
return response?.Items ?? new List<PlayerInventoryItem>();
}
}