Example #1
0
 public bool EditPost(string postid, string username, string password, Post post, bool publish)
 {
     using (var metaWeblog = new MetaWeblogPost(username, password, postid))
     {
         string publicationStatus = publish
                                        ? GenericPublishProcessController.Published
                                        : GenericPublishProcessController.Draft;
         return metaWeblog.EditPost(post.title, post.description, publicationStatus);
     }
 }
Example #2
0
 public string AddPost(string blogid, string username, string password, Post post, bool publish)
 {
     using (var metaWeblog = new MetaWeblogBlog(username, password, blogid))
     {
         string publicationStatus = publish
                                        ? GenericPublishProcessController.Published
                                        : GenericPublishProcessController.Draft;
         return metaWeblog.AddPost(post.title, post.description, publicationStatus).ToString();
     }
 }