Esempio n. 1
0
 public virtual bool EditPost(int postID, Post content, bool publish)
 {
     return _wrapper.EditPost(postID, Username, Password, Map.From.Post(content), publish);
 }
Esempio n. 2
0
        private int createNewPost()
        {
            var post = new Post()
            {
                Body = "This is a test body",
                Categories = new string[] { "1", "2", "3" },
                Tags = new string[] { "tag one", "another tag", "one more" },
                Title = "Test post",
            };

            return _wpWrapper.NewPost(post, true);
        }
Esempio n. 3
0
 /// <summary> 
 /// Posts a new entry to a blog. 
 /// </summary> 
 /// <param name="post">The Post.</param>
 /// <param name="publish">If false, this is a draft post.</param>
 /// <returns>The postid of the newly-created post.</returns>
 public virtual int NewPost(Post post, bool publish)
 {
     var content = Map.From.Post(post);
     return Convert.ToInt16(_wrapper.NewPost(this.BlogID, Username, Password, content, publish));
 }
Esempio n. 4
0
 internal static XmlRpcPost Post(Post input)
 {
     return new XmlRpcPost
     {
         categories = input.Categories,
         dateCreated = input.DateCreated,
         description = input.Body,
         mt_keywords = input.Tags,
         postid = Convert.ToString(input.PostID),
         title = input.Title
     };
 }