示例#1
0
        /// <summary>
        /// Deletes the CommentReply.
        /// </summary>
        /// <param name="details">The details.</param>
        /// <returns></returns>
        public async Task <APIResponse> DeleteCommentReply(CommentReplyIdDetails details)
        {
            try
            {
                var client = httpClientFactory.CreateClient(BlogServiceOperation.serviceName);

                var response = await client.DeleteAsync(servicesConfig.Blog + BlogServiceOperation.DeleteCommentReply(details.CommentReplyId));

                return(new APIResponse(response.StatusCode));
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Exception in method 'DeleteCommentReply()'");
                var exMessage = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                return(new APIResponse(exMessage, HttpStatusCode.InternalServerError));
            }
        }