2014-05-19 - MetaWeblog API
So the other day I was reading a blog post about Windows Live Writer. It’s a word processor type application but for blogs. You can create new posts, edit old posts, and even upload pictures. It connects to the server hosting the blog and then communicates back and forth with it. I thought “That’s cool, too bad it won’t work on my blog because it’s all custom”. Then I stumbled upon the MetaWeblog API and Really Simple Discovery (RSD).
Let's start with RSD. RSD is a schema for an XML file. Clients use that file to determine which services a blog supports. It has a default location but link tags in the HTML of the blog can be used to specify another location. As the name implies this makes it really simple for clients to discover how to connect to a blog.
Now the MetaWeblog API is a type of web service that can be specified using the RSD. It defines a set of methods which clients can use to communicate with the site. The entire thing is implemented using an XML Remote Procedure Call (XML-RPC) interface. The client sends the server a bunch of XML specifying what it wants to do and how it wants to do it. The server performs the requested actions and returns a bunch of XML containing the response.
Windows Live Writer supports RSD and MetaWeblog. This means that all I needed to do to use Live Writer was implement the MetaWeblog API and create an RSD file that points to it. Which I have done and now I can post to my blog with Live Writer.
Next I need to figure out how to add my own extensions to Live Writer and figure out how to upload images.
Comments: