示例#1
0
 public bool DeletePost(string key, string postid, string username, string password, bool publish)
 {
     using (var metaWeblog = new MetaWeblogPost(username, password, postid))
     {
         return metaWeblog.DeletePost();
     }
 }
示例#2
0
 public bool DeletePost(string key, string postid, string username, string password, bool publish)
 {
     using (var metaWeblog = new MetaWeblogPost(username, password, postid))
     {
         return(metaWeblog.DeletePost());
     }
 }
示例#3
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);
     }
 }
示例#4
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));
     }
 }
示例#5
0
 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(),
             };
     }
 }
示例#6
0
 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(),
         });
     }
 }