I was wondering if you might consider splitting the google_auth module into a separate Drupal.org project so that other/future Google modules might be able to benefit. I haven't searched recently to see if anyone else has written something like it, so it would need more investigation.

Comments

cyberswat’s picture

I'll take a look into doing this. There are actually two components of using Google's web services that could be split out of this. The first one, as you identified, is the authentication. The second would be the xml processing of their feeds. Each of their feeds are comprised of different namespaces ... some of which are google created and some not. Here's an example from one of the picasa related entries:

<feed xmlns='http://www.w3.org/2005/atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:exif='http://schemas.google.com/photos/exif/2007'
xmlns:geo='http://www.w3.org/2003/01/geo/wgs84_pos#'
xmlns:gml='http://www.opengis.net/gml'
xmlns:georss='http://www.georss.org/georss'
xmlns:photo='http://www.pheed.com/pheed/'
xmlns:media='http://search.yahoo.com/mrss/'
xmlns:batch='http://schemas.google.com/gdata/batch'
xmlns:gphoto='http://schemas.google.com/photos/2007'>

Back when I had the time to work on parsing the Picasa feed I ended up realizing that a lot of time could be saved by writing methods for parsing their namespaces. An album, photo and user can share different combinations of namespaces so parsing went from being a huge pain to being extremely easy. It turns out that these namespaces are also used in different services ... so anywhere you have geo specific information the geo namespace is used, anywhere they have the media namespace it is used. In essence, these parsers can be written a single time and added to as Drupal module developers interact with more Google services. I have a significant amount of code in place in the dev version of this picasa module that could be used as a foundation for such a library. In conjunction with simply parsing the data the services that Google uses are RESTful ... so all of the CRUD calls to Google go through the same interface and require the same http headers to be constructed ... all of these calls are also in place in this module and could be extracted for other module developers to tie into.

There's a lot I would love to do with this information if I had the time.

cyberswat’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.