feat(core): dynamic settings service, IFinlyticLogger, log broadcaster, and persistent Yahoo auth
This commit is contained in:
@@ -9,7 +9,6 @@ using FinlyticCore.Dtos.Yahoo;
|
||||
using FinlyticCore.Models.Settings;
|
||||
using FinlyticCore.Services;
|
||||
using FinlyticCore.Services.PlaywrightScrapper;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Playwright;
|
||||
|
||||
namespace FinlyticCore.Clients;
|
||||
@@ -21,25 +20,18 @@ public interface IYahooFinanceHtmlClient
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
public interface IYahooFinanceHtmlClient<TDbContext> : IYahooFinanceHtmlClient
|
||||
where TDbContext : DbContext
|
||||
{
|
||||
}
|
||||
|
||||
public class YahooFinanceHtmlClient<TContextClass, TDbContext> : IYahooFinanceHtmlClient<TDbContext>
|
||||
where TDbContext : DbContext
|
||||
public class YahooFinanceHtmlClient : IYahooFinanceHtmlClient
|
||||
{
|
||||
private const string _serviceName = nameof(YahooFinanceHtmlClient);
|
||||
private readonly IPlaywrightExecutionService _playwrightService;
|
||||
private readonly IFinlyticLogger<TContextClass, TDbContext> _finlyticLogger;
|
||||
private readonly string _serviceName;
|
||||
private readonly IFinlyticLogger<YahooFinanceHtmlClient> _finlyticLogger;
|
||||
|
||||
public YahooFinanceHtmlClient(
|
||||
IPlaywrightExecutionService playwrightService,
|
||||
IFinlyticLogger<TContextClass, TDbContext> finlyticLogger)
|
||||
IFinlyticLogger<YahooFinanceHtmlClient> finlyticLogger)
|
||||
{
|
||||
_playwrightService = playwrightService;
|
||||
_finlyticLogger = finlyticLogger;
|
||||
_serviceName = typeof(TContextClass).Name;
|
||||
}
|
||||
|
||||
public async Task<YahooQuoteSummaryModulesDto?> ScrapeQuoteSummaryModulesAsync(
|
||||
|
||||
Reference in New Issue
Block a user