persistence/Persistence.Client/Clients/ITimeSeriesClient.cs

23 lines
737 B
C#
Raw Permalink Normal View History

using Microsoft.AspNetCore.Mvc;
using Persistence.Models;
using Refit;
2024-11-21 14:50:36 +05:00
namespace Persistence.Client.Clients;
public interface ITimeSeriesClient<TDto>
where TDto : class, new()
{
private const string BaseRoute = "/api/dataSaub";
[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();
}