Esempio n. 1
0
        /// <summary>
        /// Update specific Filter
        /// </summary>
        /// <param name="filterId">The entity id</param>
        /// <param name="filter">The entity we are going to update</param>
        /// <param name="ctk">CancellationToken</param>
        /// <returns>Custom Filter Entity</returns>
        public Task <CustomFilter> UpdateFilter(int filterId, CustomFilter filter, CancellationToken ctk = default)
        {
            filter.Validate();
            var url = "/filter".AppendPathSegment(filterId);

            return(_client.Exec <CustomFilter, CustomFilter>(HttpMethod.Put, url, filter));
        }
Esempio n. 2
0
        /// <summary>
        /// Create a new Filter
        /// </summary>
        /// <param name="filter">The entity we are going to insert</param>
        /// <param name="ctk">CancellationToken</param>
        /// <returns>Custom Filter Entity</returns>
        public Task <CustomFilter> CreateFilter(CustomFilter filter, CancellationToken ctk = default)
        {
            filter.Validate();
            var url = "/filter";

            return(_client.Exec <CustomFilter, CustomFilter>(HttpMethod.Post, url, filter));
        }