There's a new assembly available in the mono svn repository, module google-sharp. The classes it contains lets you authenticate to a Google service and there also support for managing your Picasa web galleries. As a plus, it also contains monodoc documentation.
The authentication process logs securely into the service as a web browser would do and retrieves the cookies needed. Once we those cookies, we can access the service over HTTP.
In the example, we create a GoogleConnection to be used with Picasa web and do the authentication for the given user and password. Setting the CertificatePolicy to that value will make it accept any server certificate when using an HTTPS connection. To know more about why that is needed (and other ways of achieving the same) see the Mono security FAQ.
Managing a Picasa Web gallery
Once you're authenticated, you can create an album:
Download all the pictures in it:
Upload a new picture to an album:
Of course, there's a caveat: currently the authentication process fails when running under MS.NET (too many redirections), so that means that:
- We have a bug in Mono that I'm not going to fix by now.
- I have to figure out how to make that work on MS
Hopefully, this will open the door for a Picasa Web plugin for f-spot, as Picasa for linux lacks support for Picasa Web. A command-line tool for uploading pictures is on the way.
blog comments powered by Disqus