Exemplo n.º 1
0
        public virtual int DeleteDocument(string id, string configId = null)
        {
            string encodedId = HttpUtility.UrlEncode(id);
            string url       = RepositoryClient.BuildUrl(ApiKeys, $"document/{encodedId}", configId);
            int    status    = RepositoryClient.Delete(url, null);

            return(status);
        }
        public virtual int RemoveConfigurations(List <string> itemIds)
        {
            var url      = RepositoryClient.BuildUrl(ApiKeys, "configurations");
            var data     = JsonConvert.SerializeObject(itemIds);
            var response = RepositoryClient.Delete(url, data);

            return(response);
        }
        public virtual int DeleteTaxonomy(List <string> itemIds, string configId = null)
        {
            var url      = RepositoryClient.BuildUrl(ApiKeys, "taxonomy", configId);
            var data     = JsonConvert.SerializeObject(itemIds);
            var response = RepositoryClient.Delete(url, data);

            return(response);
        }
Exemplo n.º 4
0
        public virtual int DeleteBlacklistItem(List <string> items, string configId = null)
        {
            string url      = RepositoryClient.BuildUrl(ApiKeys, "blacklist", configId);
            var    data     = JsonConvert.SerializeObject(items);
            var    response = RepositoryClient.Delete(url, data);

            return(response);
        }
        public virtual int DeleteCategories(List <CategoryItem> items, string configId = null)
        {
            string url      = RepositoryClient.BuildUrl(ApiKeys, "categories", configId);
            var    data     = JsonConvert.SerializeObject(items);
            var    response = RepositoryClient.Delete(url, data);

            return(response);
        }
Exemplo n.º 6
0
        public virtual int RemoveSentimentPhrases(List <SentimentPhraseItem> items, string configId = null)
        {
            var url      = RepositoryClient.BuildUrl(ApiKeys, "phrases", configId);
            var data     = JsonConvert.SerializeObject(items);
            var response = RepositoryClient.Delete(url, data);

            return(response);
        }
Exemplo n.º 7
0
        public virtual int DeleteCollection(string id, string configId = null)
        {
            string encodedId = HttpUtility.UrlEncode(id);
            string url       = RepositoryClient.BuildUrl(ApiKeys, $"collection/{encodedId}", configId);
            var    response  = RepositoryClient.Delete(url, null);

            return(response);
        }