The interactive demo is written in JavaScript. The HTTP requests and responses that appear when you run the demo provide good examples of the requests and responses your application needs to handle.
You can run the interactive demo directly from this site. It is fairly self-explanatory.
The primary implementation files are demo.js and httpRequest.js.
The following function constructs a Request header, including the AuthSub token and the developer key.
function constructRequestHeaders(token) {
var headers = new Array();
headers["Content-Type"] = "application/atom+xml";
headers["Authorization"] = 'AuthSub token="' + token + '"';
headers["X-Google-Key"] = 'key=ABQIAAAA7VerLsOcLuBYXR7vZI2NjhTRERdeAiwZ9EeJWta3L_JZVS0bOBRIFbhTrQjhHE52fqjZvfabYYyn6A';
return headers;
}