23 lines
737 B
C#
23 lines
737 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Persistence.Models;
|
|
using Refit;
|
|
|
|
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();
|
|
}
|