public bool DeletePost(string key, string postid, string username, string password, bool publish) { using (var metaWeblog = new MetaWeblogPost(username, password, postid)) { return metaWeblog.DeletePost(); } }
public bool DeletePost(string key, string postid, string username, string password, bool publish) { using (var metaWeblog = new MetaWeblogPost(username, password, postid)) { return(metaWeblog.DeletePost()); } }
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); } }
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)); } }
public Post GetPost(string postid, string username, string password) { using (var metaWeblog = new MetaWeblogPost(username, password, postid)) { Entries blogEntry = metaWeblog.GetPost(); return new Post { postid = blogEntry.Id.ToString(), dateCreated = blogEntry.Date, description = metaWeblog.FullMediaUrl(blogEntry.Content), title = blogEntry.Title, link = blogEntry.GetPublicUrl(), }; } }
public Post GetPost(string postid, string username, string password) { using (var metaWeblog = new MetaWeblogPost(username, password, postid)) { Entries blogEntry = metaWeblog.GetPost(); return(new Post { postid = blogEntry.Id.ToString(), dateCreated = blogEntry.Date, description = metaWeblog.FullMediaUrl(blogEntry.Content), title = blogEntry.Title, link = blogEntry.GetPublicUrl(), }); } }