mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-14 01:25:38 -05:00
Add grouped weather value API
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user