public void QueryBindTest() { var request = new BindListQueryRequest(); //request.ChannelId = 3789323588078526627; var client = new Client(_apiKey, _secretKey); var response = client.QueryBindList(request); Assert.NotNull(response); Assert.Greater(response.RequestId, 0); Assert.NotNull(response.ResponseParams); //Assert.Greater(response.ResponseParams.Amount, 0); }
/// <summary> /// Query Binds /// </summary> /// <param name="request">Query Binds request parameter</param> /// <returns></returns> public BindListQueryResponse QueryBindList(BindListQueryRequest request) { var postStr = request.GeneratePostData(Apikey, SecretKey); var response = PostData(request.ServiceUrl, postStr); if (response == null) return null; BindListQueryResponse result = null; try { var serializerSettings = new JsonSerializerSettings(); serializerSettings.Converters.Add(new UnixDateTimeConverter()); result = JsonConvert.DeserializeObject<BindListQueryResponse>(response, serializerSettings); } catch (Exception ex) { Debug.WriteLine("QueryBindList Error Response Deserialize Fail, May not valid json:" + ex.Message + " " + response); } return result; }