public static async Task <IEnumerable <ShopSensorEvent> > GetTodayEvents() { var response = await http.GetAsync("api/ShopSensor?daysSince=1"); var content = await response.Content.ReadAsStringAsync(); return(ShopSensorEvent.FromJson(content)); }
public async Task <IEnumerable <ShopSensorEvent> > ReadTodayEvents() { return(ShopSensorEvent.FromJson( await(await http.GetAsync("api/ShopSensor?DaysSince=2")) .Content.ReadAsStringAsync())); }