Add LittleShop.Client SDK library with complete API wrapper
Features: - Complete .NET client SDK for LittleShop API - JWT authentication with automatic token management - Catalog service for products and categories - Order service with payment creation - Retry policies using Polly for resilience - Error handling middleware - Dependency injection support - Comprehensive documentation and examples SDK Components: - Authentication service with token refresh - Strongly-typed models for all API responses - HTTP handlers for retry and error handling - Extension methods for easy DI registration - Example console application demonstrating usage Test Updates: - Fixed test compilation errors - Updated test data builders for new models - Corrected service constructor dependencies - Fixed enum value changes (PaymentStatus, OrderStatus) Documentation: - Complete project README with features and usage - Client SDK README with detailed examples - API endpoint documentation - Security considerations - Deployment guidelines Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
29
LittleShop.Client/LittleShopClient.cs
Normal file
29
LittleShop.Client/LittleShopClient.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using LittleShop.Client.Configuration;
|
||||
using LittleShop.Client.Services;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace LittleShop.Client;
|
||||
|
||||
public interface ILittleShopClient
|
||||
{
|
||||
IAuthenticationService Authentication { get; }
|
||||
ICatalogService Catalog { get; }
|
||||
IOrderService Orders { get; }
|
||||
}
|
||||
|
||||
public class LittleShopClient : ILittleShopClient
|
||||
{
|
||||
public IAuthenticationService Authentication { get; }
|
||||
public ICatalogService Catalog { get; }
|
||||
public IOrderService Orders { get; }
|
||||
|
||||
public LittleShopClient(
|
||||
IAuthenticationService authenticationService,
|
||||
ICatalogService catalogService,
|
||||
IOrderService orderService)
|
||||
{
|
||||
Authentication = authenticationService;
|
||||
Catalog = catalogService;
|
||||
Orders = orderService;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user