public IHttpActionResult AtMeter(string meterId) { if (!_meteredSpacesService.Exists(meterId)) { return(NotFound()); } var lifetime = _sensorEventsService.GetDefaultLifetime(); if (lifetime == null) { lifetime = _sensorEventsService.GetMaxLifetime(); } var events = _sensorEventsService.GetViewModelsSince(lifetime.Since, meterId); return(Ok(events)); }
public IHttpActionResult Max() { var lifetime = _sensorEventsService.GetMaxLifetime(); return(Ok(lifetime)); }