The Google Reader API, as used by different desktop and mobile RSS feed readers to synchronise settings and contents, is still officially unofficial, but there are four or five resources on the Internet with some information (and which somehow all link to each other..). I found it a bit difficult, though, to get any working source code. There were some changes earlier this year with regards to the authentication mechanism, but most what is published about the API appears to have frozen in time around the end of 2009. Looking for information on the inner workings of the API for some software I wanted to write in F#, I came across this post by Sandrino Di Mattia who wrote a whole C# library based on the latest API version, which can also be downloaded from his blog.
Now, this isn’t exactly what I wanted to do myself, mainly because it’s in C#, but also because it is using only synchronous requests. But I found his explanations very useful and the code itself is well written, so I decided as a first step in my own project to replicate this in F#. It is quite a straightforward translation from one language into the other, so the whole code looks like written in C# using F# syntax (which it is), so probably not nice to look at if you’re a functional purist. But as an example I find it useful enough to put it on CodePlex. Sandrino has kindly agreed to make his code freely available, and I have put the F# version under an MIT licence, so if you should need this sort of thing, please peruse at your leisure.
I will not further develop this, but will see to it that bugs are fixed when they are found; please use all those CodePlex tools in order to report problems and discuss issues.
The code can be loaded into Visual Studio 2010 and built and run without further ado, although you will need an Internet connection. There’s an F# library project, accompanied by a console application to play around with.
No comments:
Post a Comment