Using .NET To Access Google Data
Google Data includes the data used in Google services, data which is stored on the web. This includes Google Analytics data, Google Apps data (such as spreadsheets and documents), Blogger posts, Picasa Web Albums, Google Calendar data and much more. Google provides an API for accessing this data. Lately I’ve been working on how to access and modify Google Data using .NET. The obvious place to start is the Google Data .NET client library. There is a nice guide for setting yourself up and getting started with this library, as well as developer guides for accessing Google data, such as spreadsheet data, using the .NET client library.
While the .NET client library provides an object oriented, programmatic interface to data stored in Google, the basis for the object model is based on Atom and the Atom Publishing Protocol. For example, the object model for accessing Google Spreadsheets is similar in many ways to the Excel object model, but in certain respects very different. While I don’t think one necessarily has to have intimate knowledge of the low level internals of Atom to use the .NET client library, I have found it helpful to understand them. What follows is the material I used to educate myself.
Lesson 1: The Atom Publishing Protocol
The Google Data API is based on the Atom Publishing Protocol (”AtomPub”), which in turn is based on the Atom syndication format. The following video provides a nice introduction:
Further Reading:
- Atom: http://www.ietf.org/rfc/rfc4287.txt
- Atom Publishing Protocol: http://www.rfc-editor.org/rfc/rfc5023.txt
Since AtomPub is a RESTful protocol, you may also enjoy an introduction to REST, although I don’t think this is strictly necessary for understanding the Google Data API:
Lesson 2: How The Google Data API Uses AtomPub
The following explains how the Google Data API is implemented using AtomPub, providing some good examples at the AtomPub level, including the concepts of a service, a query and a feed:
Lesson 3: Getting Starting With The .NET Client Library
At this point, I find that it is now easier to understand the concepts behind the object model in the .NET client library. This final video gives an introduction to the .NET client library where you will see the concepts of authentication, services, queries and feeds being used:























