public GatewayInfo GetGatewayInfo() { gatewayInfo = JsonConvert.DeserializeObject <GatewayInfo>(cc.GetValues(new TradFriRequest { UriPath = $"/{(int)TradFriConstRoot.Gateway}/{(int)TradFriConstAttr.GatewayInfo}" }).PayloadString); return(gatewayInfo); }
/// <summary> /// Acquires GatewayInfo object /// </summary> /// <param name="refresh">If set to true, than it will ignore existing cached value and ask the gateway for the object</param> /// <returns></returns> public GatewayInfo GetGatewayInfo(bool refresh = false) { if (!refresh && gatewayInfo != null) { return(gatewayInfo); } gatewayInfo = JsonConvert.DeserializeObject <GatewayInfo>(cc.GetValues(new TradFriRequest { UriPath = $"/{(int)TradFriConstRoot.Gateway}/{(int)TradFriConstAttr.GatewayInfo}" }).PayloadString); return(gatewayInfo); }
/// <summary> /// Get device information from gateway /// </summary> /// <returns></returns> public Response Get() { return(cc.GetValues(new TradFriRequest { UriPath = $"/{(int)TradFriConstRoot.Devices}/{id}" })); }
/// <summary> /// Get device information from gateway /// </summary> /// <returns></returns> public Response Get() { return(_coapClient.GetValues(new TradfriRequest { UriPath = $"/{(int)TradfriConstRoot.Devices}/{_id}" })); }