Implemented DLSiteClient.

This commit is contained in:
2025-09-08 17:08:47 -04:00
parent 429252e61f
commit f250276a99
39 changed files with 1584 additions and 173 deletions

View File

@@ -0,0 +1,27 @@
using JSMR.Application.Integrations.Ports;
using JSMR.Infrastructure.Integrations.DLSite.Serialization;
using Microsoft.Extensions.DependencyInjection;
namespace JSMR.Infrastructure.Integrations.DLSite;
public static class DLSiteClientRegistration
{
//public static IServiceCollection AddDLSiteClient(this IServiceCollection services, Uri baseAddress)
//{
// // Build per-client JSON options with the DLSite-specific converters
// var json = DLSiteJsonContext.CreateOptions();
// services.AddHttpClient<IDLSiteClient, DLSiteClient>(client =>
// {
// client.BaseAddress = baseAddress; // e.g., new Uri("https://www.dlsite.com/")
// client.DefaultRequestHeaders.Accept.ParseAdd("application/json");
// client.Timeout = TimeSpan.FromSeconds(20);
// })
// .AddPolicyHandler(ResiliencePolicies.DefaultRetry()); // optional Polly
// // Provide the options to the client via DI
// services.AddSingleton(json);
// return services;
//}
}