23 lines
923 B
C#
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);
|
|
}
|