Add grouped weather value API

This commit is contained in:
2019-10-16 20:21:08 -04:00
parent 3abeca9a79
commit 1186f9179d
5 changed files with 44 additions and 0 deletions

View File

@@ -38,6 +38,12 @@ namespace ChrisKaczor.HomeMonitor.Weather.Service.Controllers
return (await _database.GetReadingValueHistory(weatherValueType, start, end)).ToList();
}
[HttpGet("value-history-grouped")]
public async Task<ActionResult<List<WeatherValueGrouped>>> GetValueHistoryGrouped(WeatherValueType weatherValueType, DateTimeOffset start, DateTimeOffset end, int bucketMinutes = 2)
{
return (await _database.GetReadingValueHistoryGrouped(weatherValueType, start, end, bucketMinutes)).ToList();
}
[HttpGet("history-grouped")]
public async Task<ActionResult<List<WeatherReadingGrouped>>> GetHistoryGrouped(DateTimeOffset start, DateTimeOffset end, int bucketMinutes = 2)
{