public DelDerivedResResult DeleteDerivedResources(DelDerivedResParams parameters) { UrlBuilder urlBuilder = new UrlBuilder( m_api.ApiUrlV. Add("derived_resources"). BuildUrl()); foreach (var param in parameters.ToParamsDictionary()) { if (param.Value is IEnumerable <string> ) { foreach (var item in (IEnumerable)param.Value) { urlBuilder.QueryString.Add(String.Format("{0}[]", param.Key), item.ToString()); } } else { urlBuilder.QueryString[param.Key] = param.Value.ToString(); } } using (HttpWebResponse response = m_api.Call( HttpMethod.DELETE, urlBuilder.ToString(), null, null)) { DelDerivedResResult result = DelDerivedResResult.Parse(response); return(result); } }
public DelDerivedResResult DeleteDerivedResources(DelDerivedResParams parameters) { UrlBuilder urlBuilder = new UrlBuilder( m_api.ApiUrlV. Add("derived_resources"). BuildUrl(), parameters.ToParamsDictionary()); using (HttpWebResponse response = m_api.Call( HttpMethod.DELETE, urlBuilder.ToString(), null, null)) { DelDerivedResResult result = DelDerivedResResult.Parse(response); return(result); } }
public async Task <DelDerivedResResult> DeleteDerivedResourcesAsync(DelDerivedResParams parameters) { using (var response = await Api.CallAsync(HttpMethod.Delete, new UrlBuilder(Api.ApiUrlV.Add("derived_resources").BuildUrl(), parameters.ToParamsDictionary()).ToString(), null, null, null)) { return(await DelDerivedResResult.Parse(response)); } }