using JSMR.Application.Integrations.Chobit.Models;
using JSMR.Application.Integrations.Ports;
using JSMR.Infrastructure.Http;
using Microsoft.Extensions.Logging;

namespace JSMR.Infrastructure.Integrations.Chobit;

public class ChobitClient(IHttpService http, ILogger logger) : ApiClient(http, logger), IChobitClient
{
    public Task<ChobitWorkResult> GetSampleInfoAsync(string[] productIds, CancellationToken cancellationToken = default)
    {
        var url = $"api/v2/dlsite/embed?workno_list=${string.Join(",", productIds)}";
        return GetJsonAsync<ChobitWorkResult>(url, cancellationToken);
    }
}