2024-11-26 12:27:52 +05:00
|
|
|
|
using Persistence.Models;
|
2024-11-14 15:17:43 +05:00
|
|
|
|
using Refit;
|
|
|
|
|
|
2024-12-09 14:45:35 +05:00
|
|
|
|
namespace Persistence.Client.Clients.Interfaces.Refit;
|
2024-12-10 13:55:01 +05:00
|
|
|
|
public interface IRefitTimeSeriesClient<TDto> : IDisposable
|
|
|
|
|
where TDto : class, new()
|
2024-11-14 15:17:43 +05:00
|
|
|
|
{
|
2024-11-22 15:47:00 +05:00
|
|
|
|
private const string BaseRoute = "/api/dataSaub";
|
2024-11-18 14:22:09 +05:00
|
|
|
|
|
2024-11-22 15:47:00 +05:00
|
|
|
|
[Post($"{BaseRoute}")]
|
2024-12-09 14:45:35 +05:00
|
|
|
|
Task<IApiResponse<int>> AddRange(IEnumerable<TDto> dtos, CancellationToken token);
|
2024-11-22 15:47:00 +05:00
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}")]
|
2024-12-09 14:45:35 +05:00
|
|
|
|
Task<IApiResponse<IEnumerable<TDto>>> Get(DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token);
|
2024-11-22 15:47:00 +05:00
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/resampled")]
|
2024-12-09 14:45:35 +05:00
|
|
|
|
Task<IApiResponse<IEnumerable<TDto>>> GetResampledData(DateTimeOffset dateBegin, double intervalSec = 600d, int approxPointsCount = 1024, CancellationToken token = default);
|
|
|
|
|
|
2024-11-22 15:47:00 +05:00
|
|
|
|
[Get($"{BaseRoute}/datesRange")]
|
2024-12-09 14:45:35 +05:00
|
|
|
|
Task<IApiResponse<DatesRangeDto?>> GetDatesRange(CancellationToken token);
|
2024-11-14 15:17:43 +05:00
|
|
|
|
}
|