public async Task<TemperatureEntity> GetLatestTemperatureRawDataByUUIDAsync(string uuid) { uuid.ThrowIfParameterIsNullOrWhiteSpace(nameof(uuid)); GenericRequest content = new GenericRequest() { UUID = uuid }; string url = string.Concat(configuration.EndpointUrl.AbsoluteUri, "ethLogShared.asmx/GetLatestTemperatureRawDataByUUID"); var result = await http.Post<GenericRequest, GenericResponse<TemperatureEntity>>(url, content); return result.Data; }
public async Task<MotionEntity> GetDetailLogByUUIDAsync(string uuid, DateTime date) { uuid.ThrowIfParameterIsNullOrWhiteSpace(nameof(uuid)); GenericRequest content = new GenericRequest() { ID = uuid, Date = date.ToString(), }; string url = string.Concat(configuration.EndpointUrl.AbsoluteUri, "ethLogShared.asmx/GetDetailLogByUUID"); var result = await http.Post<GenericRequest, GenericResponse<MotionEntity>>(url, content); return result.Data; }
public async Task<IEnumerable<StatsEntity>> GetStatsRawByUUIDAsync(string uuid, DateTime fromDate, DateTime toDate) { uuid.ThrowIfParameterIsNullOrWhiteSpace(nameof(uuid)); GenericRequest content = new GenericRequest() { UUID = uuid, FromDate = fromDate.ToString(), ToDate = toDate.ToString(), }; string url = string.Concat(configuration.EndpointUrl.AbsoluteUri, "ethLogShared.asmx/GetStatsRawByUUID"); var result = await http.Post<GenericRequest, GenericResponse<IEnumerable<StatsEntity>>>(url, content); return result.Data; }
public async Task<StatsCollectionEntity> GetHourlyStatsByUUIDsAsync(string[] uuids, string sensorType) { uuids.ThrowIfObjectIsNull(nameof(uuids)); sensorType.ThrowIfParameterIsNullOrWhiteSpace(nameof(sensorType)); GenericRequest content = new GenericRequest() { UUIDs = uuids, Type = sensorType, }; string url = string.Concat(configuration.EndpointUrl.AbsoluteUri, "ethLogShared.asmx/GetHourlyStatsByUUIDs"); var result = await http.Post<GenericRequest, GenericResponse<StatsCollectionEntity>>(url, content); return result.Data; }