Пример #1
0
 public Response GetResponse(object data, string templateName, IParser parser)
 {
     var connection = new Connection(_authentication.ApiUrl);
     var template = _templateFactory.GetInstance(templateName);
     template.Authentication = _authentication;
     var requestBody = template.Render(data);
     var response = connection.Request("post", requestBody, null);
     return parser.Parse(response);
 }
        // GetCustomerProfileIds
        public long[] GetCustomerProfileIds()
        {
            var connection = new Connection(_authentication.ApiUrl);

            var template = _templateFactory.GetInstance("getCustomerProfileIds.spark");

            template.Authentication = _authentication;
            var response = connection.Request("post", template.Render(null), null);
            //Console.WriteLine(response);
            return new long[] { };
        }
 public void ResponseExceptionIsThrownIfResponseIsNotSuccessful()
 {
     var cxn = new Connection("http://cosmicvent.com/test-tube-baby");
     var response = cxn.Request("get", null, null);
 }
 public void CanMakeAValidRequestToAServer()
 {
     var cxn = new Connection("http://google.com");
     var response = cxn.Request("get", null, null);
 }