persistence/Persistence/API/IGraphData.cs

27 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.AspNetCore.Mvc;
using Persistence.Models;
namespace Persistence.API;
/// <summary>
/// Интерфейс для работы с API графиков
/// </summary>
public interface IGraphData<TDto>
{
/// <summary>
/// Получить список объектов с прореживанием, удовлетворящий диапазону дат
/// </summary>
/// <param name="dateBegin">дата начала</param>
/// <param name="dateEnd">дата окончания</param>
/// <param name="approxPointsCount"></param>
/// <returns></returns>
Task<ActionResult<IEnumerable<TDto>>> GetThinnedDataAsync(DateTimeOffset dateBegin, DateTimeOffset dateEnd, int approxPointsCount = 1024);
/// <summary>
/// Получить диапазон дат, для которых есть данные в репозитории
/// </summary>
/// <param name="token"></param>
/// <returns></returns>
Task<ActionResult<DatesRangeDto>> GetDatesRangeAsync(CancellationToken token);
}