BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler.GetPost C# (CSharp) Method

GetPost() private method

metaWeblog.getPost method
private GetPost ( string postId, string userName, string password ) : BlogEngine.Core.API.MetaWeblog.MWAPost
postId string /// post guid in string format ///
userName string /// login username ///
password string /// login password ///
return BlogEngine.Core.API.MetaWeblog.MWAPost
        internal MWAPost GetPost(string postId, string userName, string password)
        {
            var sendPost = new MWAPost();
            var post = Post.GetPost(new Guid(postId));

            if (!post.IsVisible)
            {
                throw new MetaWeblogException("11", "User authentication failed");
            }

            sendPost.postID = post.Id.ToString();
            sendPost.postDate = post.DateCreated;
            sendPost.title = post.Title;
            sendPost.description = post.Content;
            sendPost.link = post.AbsoluteLink.AbsoluteUri;
            sendPost.slug = post.Slug;
            sendPost.excerpt = post.Description;
            sendPost.commentPolicy = post.HasCommentsEnabled ? "1" : "0";
            sendPost.publish = post.IsPublished;

            var cats = post.Categories.Select(t => Category.GetCategory(t.Id).ToString()).ToList();

            sendPost.categories = cats;

            var tags = post.Tags.ToList();

            sendPost.tags = tags;

            return sendPost;
        }