public void QueryDeviceTypeTest() { var request = new DeviceTypeQueryRequest(3789323588078526627); var client = new Client(_apiKey, _secretKey); var response = client.QueryDeviceType(request); Assert.NotNull(response); Assert.Greater(response.RequestId, 0); }
/// <summary> /// query_device_type /// </summary> /// <param name="request">set tag request parameter</param> /// <returns></returns> public DeviceTypeQueryResponse QueryDeviceType(DeviceTypeQueryRequest request) { var postStr = request.GeneratePostData(Apikey, SecretKey); var response = PostData(request.ServiceUrl, postStr); if (response == null) return null; DeviceTypeQueryResponse result = null; try { result = JsonConvert.DeserializeObject<DeviceTypeQueryResponse>(response); } catch (Exception ex) { Debug.WriteLine("QueryDeviceType Error Response Deserialize Fail, May not valid json:" + ex.Message + " " + response); } return result; }