Beispiel #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();
     }
 }
Beispiel #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());
     }
 }
Beispiel #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);
     }
 }
Beispiel #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));
     }
 }
Beispiel #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(),
             };
     }
 }
Beispiel #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(),
         });
     }
 }