Before I publish a post I need to know if the post already exists. I know what the title of the post is but I need a way to search the blog for an existing post using the title I already know.
I tried calling the method GetPosts() as shown below but it throws an exception. What can I do to get a list of published posts so that I can search the list. If the list contains the post I need to get the post URL.
In the code below, I changed PostStatus to "draft" and the code worked but only returned 10 draft posts and the blog has over 600.
I changed my code to pass null to the PostFilter as shown below but get the following unhandled exception.
var posts = client.GetPosts(null);
Both lines of code above return the same exception below...
CookComputing.XmlRpc.XmlRpcInvalidXmlRpcException
"response contains invalid dateTime value [response : array mapped to type Post[] : element 2 : struct mapped to type Post : member FeaturedImage mapped to type Object : struct mapped to XmlRpcStruct : member date_created_gmt : dateTime]"
Before I publish a post I need to know if the post already exists. I know what the title of the post is but I need a way to search the blog for an existing post using the title I already know.
I tried calling the method GetPosts() as shown below but it throws an exception. What can I do to get a list of published posts so that I can search the list. If the list contains the post I need to get the post URL. In the code below, I changed PostStatus to "draft" and the code worked but only returned 10 draft posts and the blog has over 600.
var posts = client.GetPosts(new PostFilter { PostType = "post", PostStatus = "publish" }).OrderByDescending(a => a.Id).ToList();
I changed my code to pass null to the PostFilter as shown below but get the following unhandled exception.
var posts = client.GetPosts(null);
Both lines of code above return the same exception below...
CookComputing.XmlRpc.XmlRpcInvalidXmlRpcException
"response contains invalid dateTime value [response : array mapped to type Post[] : element 2 : struct mapped to type Post : member FeaturedImage mapped to type Object : struct mapped to XmlRpcStruct : member date_created_gmt : dateTime]"
Please Help! Thanks, Glenn