Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
 public virtual bool EditPost(int postID, Post content, bool publish)
 {
     return _wrapper.EditPost(postID, Username, Password, Map.From.Post(content), publish);
 }
Ejemplo 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.ToInt32(_wrapper.NewPost(this.BlogID, Username, Password, content, publish));
 }