Tutorial: Get store item by ID
This tutorial shows how to load one store item with GetStoreItemByIdAsync.
Example
using LuduvoDotNet;
var client = new Luduvo();
try
{
var item = await client.GetStoreItemByIdAsync(14);
Console.WriteLine($"ID: {item.Id}");
Console.WriteLine($"Name: {item.Name}");
Console.WriteLine($"Creator: {item.CreatorUsername}");
Console.WriteLine($"Status: {item.Status}");
}
catch (StoreItemNotFoundException)
{
Console.WriteLine("Store item was not found.");
}
catch (TooManyRequestsException)
{
Console.WriteLine("Rate limit reached. Try again later.");
}
catch (HttpRequestException ex)
{
Console.WriteLine($"API request failed: {ex.Message}");
}
Notes
GetStoreItemByIdAsynccalls/store/{id}.StoreItemNotFoundExceptionis thrown for404responses.TooManyRequestsExceptionis thrown for429responses.