Files
parr_api/PARR.EsppApi/EsppApiService.cs

37 lines
1.1 KiB
C#

using Microsoft.Extensions.Logging;
using PARR.EsppApi.Models;
using PARR.EsppApi.Models.Query;
using PARR.EsppApi.Services;
using PARR.EsppApi.Settings;
namespace PARR.EsppApi
{
internal class EsppApiService : IEsppApiService
{
private readonly ILogger<EsppApiService> logger;
private readonly EsppOrderSettings esppOrderSettings;
private readonly Espp espp;
public EsppApiService(ILogger<EsppApiService> logger, EsppOrderSettings esppOrderSettings, Espp espp)
{
this.logger = logger;
this.esppOrderSettings = esppOrderSettings;
this.espp = espp;
}
public async Task<EsppResultBase<IEnumerable<EsppOrder>>> FindOrdersAsync(FindOrdersQuery query)
{
logger.LogInformation("Привет!");
// var url = esppOrderSettings.Url;
var aaa = await espp.Get();
logger.LogInformation($"asdasd: {aaa}");
var esppOrders = new List<EsppOrder>();
return new EsppResultBase<IEnumerable<EsppOrder>>(esppOrders, true);
}
}
}