Пример #1
0
 public async Task <TransformResult> CreateTransformAsync(CreateTransformParams parameters)
 {
     using (var response = await Api.CallAsync(HttpMethod.Post, Api.ApiUrlV.ResourceType("transformations").Add(parameters.Name).BuildUrl(), parameters.ToParamsDictionary(), null, null))
     {
         return(await TransformResult.Parse(response));
     }
 }
Пример #2
0
 public async Task <TransformResult> DeleteTransformAsync(string transformName)
 {
     using (var response = await Api.CallAsync(HttpMethod.Delete, Api.ApiUrlV.ResourceType("transformations").Add(transformName).BuildUrl(), null, null, null))
     {
         return(await TransformResult.Parse(response));
     }
 }
Пример #3
0
        public TransformResult DeleteTransform(string transformName)
        {
            UrlBuilder urlBuilder = new UrlBuilder(
                m_api.ApiUrlV.
                ResourceType("transformations").
                Add(transformName).
                BuildUrl());

            using (HttpWebResponse response = m_api.Call(
                       HttpMethod.DELETE, urlBuilder.ToString(), null, null))
            {
                TransformResult result = TransformResult.Parse(response);
                return(result);
            }
        }
Пример #4
0
        public TransformResult CreateTransform(CreateTransformParams parameters)
        {
            UrlBuilder urlBuilder = new UrlBuilder(
                m_api.ApiUrlV.
                ResourceType("transformations").
                Add(parameters.Name).
                BuildUrl());

            urlBuilder.QueryString["transformation"] = parameters.Transform.Generate();

            using (HttpWebResponse response = m_api.Call(
                       HttpMethod.POST, urlBuilder.ToString(), null, null))
            {
                TransformResult result = TransformResult.Parse(response);
                return(result);
            }
        }