2024-11-14 15:17:43 +05:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2024-11-22 15:47:00 +05:00
|
|
|
|
using Persistence.Models;
|
2024-11-14 15:17:43 +05:00
|
|
|
|
using Refit;
|
|
|
|
|
|
2024-11-21 14:50:36 +05:00
|
|
|
|
namespace Persistence.Client.Clients;
|
2024-11-14 15:17:43 +05:00
|
|
|
|
public interface ITimeSeriesClient<TDto>
|
|
|
|
|
where TDto : class, new()
|
|
|
|
|
{
|
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}")]
|
|
|
|
|
Task<IApiResponse<int>> InsertRange(IEnumerable<TDto> dtos);
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}")]
|
|
|
|
|
Task<IApiResponse<IEnumerable<TDto>>> Get(DateTimeOffset dateBegin, DateTimeOffset dateEnd);
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/resampled")]
|
|
|
|
|
Task<IApiResponse<IEnumerable<TDto>>> GetResampledData(DateTimeOffset dateBegin, double intervalSec = 600d, int approxPointsCount = 1024);
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/datesRange")]
|
|
|
|
|
Task<IApiResponse<DatesRangeDto?>> GetDatesRange();
|
2024-11-14 15:17:43 +05:00
|
|
|
|
}
|