persistence/DD.Persistence.Client/Clients/Interfaces/Refit/IRefitTimeSeriesClient.cs
Roman Efremov 750788d550
Some checks failed
Unit tests / test (push) Failing after 47s
Наработки
2025-01-13 17:45:49 +05:00

23 lines
923 B
C#

using DD.Persistence.Models.Common;
using DD.Persistence.ModelsAbstractions;
using Refit;
namespace DD.Persistence.Client.Clients.Interfaces.Refit;
public interface IRefitTimeSeriesClient<TDto> : IRefitClient, IDisposable
where TDto : class, ITimestampAbstractDto
{
private const string BaseRoute = "/api/dataSaub";
[Post($"{BaseRoute}")]
Task<IApiResponse<int>> AddRange(IEnumerable<TDto> dtos, CancellationToken token);
[Get($"{BaseRoute}")]
Task<IApiResponse<IEnumerable<TDto>>> Get(DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token);
[Get($"{BaseRoute}/resampled")]
Task<IApiResponse<IEnumerable<TDto>>> GetResampledData(DateTimeOffset dateBegin, double intervalSec = 600d, int approxPointsCount = 1024, CancellationToken token = default);
[Get($"{BaseRoute}/datesRange")]
Task<IApiResponse<DatesRangeDto?>> GetDatesRange(CancellationToken token);
}