RSD and XML-RPC and my Blog
On The 268th Day of the 2007th Year DrDaMour Wrote
So, for some reason i have newfound interest in making my blog better. Just earlier today i made permalinks work, and now i'm actually trying to implement the Webservices to make it work with Windows Live Writer.
So first i needed to learn about RSD, or Really Simple Discovery (although i found the wikipedia entry easier and more helpful) and how to let live writer know about my available APIs.
Next i had to work with XML-RPC, the protocol that all the blog APIs (Blogger, MetaWeblog, MoveableType, & WordPress) use. Apparently there is a planned library for php, but it isn't available on my servers yet... So i had to build a very simple parser and a base API class.
Next was implementing each of the APIs. i was using fiddler to peak at all the http requests responses going back and forth.
I found something strange, the WordPress API has calls to it like blogger.getUserBlogs. I couldn't figure it out, and thought something was wrong with my RSD file, when i realized that maybe WordPress is a superset of methods to the BloggerAPI. Boy was i wrong, it's a superset to the MoveableType API, which is a superset to the MetaWeblog API, which FINALLY is a superset of the Blogger API. I figured this out by removing the different APIs from my RSD and sniffing the requests and using some deductive lgoic. Overall it made for a pretty cool pattern of inheritance for the different APIs. There's still a ton of methods i don't have implemented, but i'm past the setup wizard on live writer!
Pretty soon, i'll be able to add and edit posts much easier than how i currently am stuck doing it...by manipulating the databse directly!
So first i needed to learn about RSD, or Really Simple Discovery (although i found the wikipedia entry easier and more helpful) and how to let live writer know about my available APIs.
Next i had to work with XML-RPC, the protocol that all the blog APIs (Blogger, MetaWeblog, MoveableType, & WordPress) use. Apparently there is a planned library for php, but it isn't available on my servers yet... So i had to build a very simple parser and a base API class.
Next was implementing each of the APIs. i was using fiddler to peak at all the http requests responses going back and forth.
I found something strange, the WordPress API has calls to it like blogger.getUserBlogs. I couldn't figure it out, and thought something was wrong with my RSD file, when i realized that maybe WordPress is a superset of methods to the BloggerAPI. Boy was i wrong, it's a superset to the MoveableType API, which is a superset to the MetaWeblog API, which FINALLY is a superset of the Blogger API. I figured this out by removing the different APIs from my RSD and sniffing the requests and using some deductive lgoic. Overall it made for a pretty cool pattern of inheritance for the different APIs. There's still a ton of methods i don't have implemented, but i'm past the setup wizard on live writer!
Pretty soon, i'll be able to add and edit posts much easier than how i currently am stuck doing it...by manipulating the databse directly!

