Esempio n. 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();
     }
 }
Esempio n. 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());
     }
 }
Esempio n. 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);
     }
 }
Esempio n. 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));
     }
 }
Esempio n. 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(),
             };
     }
 }
Esempio n. 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(),
         });
     }
 }