Is there a way to get the timestamp of the latest post in C#/.net? I am writing a control in ASP.NET for a intranet, which will alert users when a new post is posted in a wordpress blog.
3 Answers
WordPress is not written in these languages and have no assumed way to interact with them.
You can access such info by connecting to WP database or by accessing WP-generated RSS feed, whatever is easier for tools you need to use.
-
I was thinking if there was any API calls that could get only the last updated date... Nov 17, 2011 at 14:30
The API you need is in asp to grab and parse an RSS feed. Use an RSS feed parser in asp and grab the top most post and then parse the date from it. There are all kinds of code samples out there for RSS parsers in asp.
You could use the wp.getPosts XML RPC API : http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.getPosts
There's an implementation of it on the JoeBlogs wrapper API
http://github.com/alexjamesbrown/joeblogs
By default, the come back in date order, newest first.
You can also specify 'Fields' to limit the fields coming back.
(This is not yet supported in JoeBlogs)