Tutorial: Search store items
This tutorial shows how to search store items with SearchStoreAsync.
Example
using LuduvoDotNet;
var client = new Luduvo();
try
{
var items = await client.SearchStoreAsync("test", limit: 20, offset: 0);
Console.WriteLine($"Found {items.Length} items");
foreach (var item in items)
{
Console.WriteLine($"- {item.Id}: {item.Name} ({item.CategoryName}) price={item.Price}");
}
}
catch (TooManyRequestsException)
{
Console.WriteLine("Rate limit reached. Try again later.");
}
catch (ArgumentOutOfRangeException ex)
{
Console.WriteLine($"Invalid paging arguments: {ex.Message}");
}
catch (HttpRequestException ex)
{
Console.WriteLine($"API request failed: {ex.Message}");
}
Notes
SearchStoreAsynccalls/store?q={query}.- The API can return either a JSON array or an object with an
itemsarray. limitis optional and must be in range1..100.offsetis optional and must be0or greater.