Ejemplo n.º 1
0
 /// <summary>
 /// 	Add a new post.
 /// </summary>
 /// <param name = "blogid">The blogid.</param>
 /// <param name = "username">The username.</param>
 /// <param name = "password">The password.</param>
 /// <param name = "post">The post.</param>
 /// <param name = "publish">if set to <c>true</c> [publish].</param>
 /// <returns></returns>
 /// <exception cref = "XmlRpcFaultException"> If <paramref name = "username" /> or <paramref name = "password" /> are invalid.</exception>
 public string AddPost(string blogid, string username, string password, Post post, bool publish)
 {
     _logger.Debug("Received call to Add Post ");
     CreatePostCommand command = new CreatePostCommand()
     {
         BlogName = blogid,
         Content = post.description,
         Title = post.title,
         Excerpt = post.mt_excerpt,
     };
     _commandDispatcher.ExecuteCommand(command);
     return command.Id.ToString("N");
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 	Updates an existing post.
        /// </summary>
        /// <param name = "postid">The postid.</param>
        /// <param name = "username">The username.</param>
        /// <param name = "password">The password.</param>
        /// <param name = "post">The post.</param>
        /// <param name = "publish">if set to <c>true</c> [publish].</param>
        /// <returns></returns>
        /// <exception cref = "XmlRpcFaultException"> If <paramref name = "username" /> or <paramref name = "password" /> are invalid.</exception>
        public bool UpdatePost(string postid, string username, string password, Post post, bool publish)
        {
            //dexterCall.StartSession();

            //try
            //{
            //    ValidateUser(username, password);

            //    ProcessPostData(string.Empty, username, password, post, postid.ToInt32(0));

            //    dexterCall.Complete(true);

            //    return true;
            //}
            //catch (Exception e)
            //{
            //    dexterCall.Complete(false);
            //    logger.Error(e.Message, e);
            //    throw;
            //}
            return true;
        }