Beispiel #1
0
        public Task <List <IMeasurement <decimal> > > GetMeasurements(string stationId, DateTime dateFrom = default)
        {
            var queryResult =
                _dynamoTableQueryRunner.QueryOnTimestampRange(
                    tableName: "rainfall-readings",
                    partionKey: "monitoring-station-id",
                    partitionValue: stationId,
                    days: DaysCalculator.DaysSinceDateFrom(dateFrom));

            return(GetReducedScanResult(queryResult));
        }
Beispiel #2
0
        public Task <Reading <decimal> > GetReading(string stationId, DateTime dateFrom = default)
        {
            var queryResult =
                _dynamoTableQueryRunner.QueryOnTimestampRange(
                    tableName: "rainfall-readings",
                    partionKey: "monitoring-station-id",
                    partitionValue: stationId,
                    days: DaysCalculator.DaysSinceDateFrom(dateFrom));

            return(PrepareRainfallReading(queryResult, stationId));
        }