예제 #1
0
파일: Mapper.cs 프로젝트: mpmagic/JoeBlogs
 internal static XmlRpcCommentFilter CommentFilter(CommentFilter input)
 {
     return(new XmlRpcCommentFilter
     {
         number = input.Number,
         offset = input.Offset,
         post_id = input.PostID,
         status = input.Status
     });
 }
        /// <summary>
        /// Gets a set of comments for a given post. Note that this only works for WordPress version 2.6.1 or higher.
        /// </summary>
        /// <param name="post_id"></param>
        /// <param name="status"></param>
        /// <param name="number"></param>
        /// <param name="offset"></param>
        /// <returns></returns>
        public IList <Comment> GetComments(string post_id, string status, int number, int offset)
        {
            //var statusList = GetCommentStatusList(post_id);
            //todo: add some validation to make sure supplied status is available.

            var filter = new CommentFilter
            {
                post_id = post_id,
                number  = number,
                offset  = offset,
                status  = status
            };

            return(wrapper.GetComments(this.BlogID, this.Username, this.Password, filter));
        }
예제 #3
0
 internal static XmlRpcCommentFilter CommentFilter(CommentFilter input)
 {
     return new XmlRpcCommentFilter
     {
         number = input.Number,
         offset = input.Offset,
         post_id = input.PostID,
         status = input.Status
     };
 }