From 2dcbb3553e504a5319be52cc2391b2759d2ad53f Mon Sep 17 00:00:00 2001 From: Nick Vella Date: Tue, 16 Jul 2019 15:17:36 +1000 Subject: [PATCH] ssg: StaticSiteClient: impl GetPost --- .../Clients/StaticSite/StaticSiteClient.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/managed/OpenLiveWriter.BlogClient/Clients/StaticSite/StaticSiteClient.cs b/src/managed/OpenLiveWriter.BlogClient/Clients/StaticSite/StaticSiteClient.cs index fe5c8b3e..3e36a1d4 100644 --- a/src/managed/OpenLiveWriter.BlogClient/Clients/StaticSite/StaticSiteClient.cs +++ b/src/managed/OpenLiveWriter.BlogClient/Clients/StaticSite/StaticSiteClient.cs @@ -117,14 +117,19 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite { etag = ""; remotePost = new XmlDocument(); - return false; + throw new NotImplementedException("not implemented yet :("); } /// /// Attempt to get a post with the specified id (note: may return null /// if the post could not be found on the remote server) /// - public BlogPost GetPost(string blogId, string postId) => new BlogPost(); + public BlogPost GetPost(string blogId, string postId) + { + var post = StaticSitePost.GetPostById(Config, postId); + if (post == null) throw new BlogClientException("Post does not exist", "Could not find post with specified ID."); // TODO use strings resources + return post.BlogPost; + } public void DeletePost(string blogId, string postId, bool publish) {