Пример #1
0
        public async Task <QuickType.Devices> GetDevicesAsync()
        {
            using var x = new DisposableTrace("GetDevices");
            var content = await SendAsync("devices");

            return(QuickType.Devices.FromJson(content));
        }
Пример #2
0
        public async Task <MultiDeviceRawData> GetAllDevicePastHourRawData(QuickType.Devices devices)
        {
            using var x = new DisposableTrace("GetPastHour");
            DateTime to   = DateTime.UtcNow;
            var      from = to.AddHours(-1.0);

            var calls = devices.DevicesDevices.Select(x => GetDeviceRawAirDataAsync(x, from, to, UseFahrenheit));
            var raws  = (await Task.WhenAll(calls)).ToList();

            var multidata = new MultiDeviceRawData(raws);

            return(multidata);
        }