Using the JavaScript Client Library w/ non-supported Services

The JavaScript client library has helper methods for Calendar, Contacts, Blogger, and Google Finance. However, you can use it with just about any Google Data API to access authenticated/private feeds. This example uses the DocList API.
<script src="" type="text/javascript"></script>
<script type="text/javascript">
google.load('gdata', '1.x');

function initialize() {
  var scope = '';
  if (google.accounts.user.checkLogin(scope)) {   
    var service = new google.gdata.client.GoogleService('writely', 'DocList-App-v1.0'); 
    service.getFeed(scope + 'documents/private/full/', handleFeed, handleError);
  } else {
    var token = google.accounts.user.login(scope); // can ignore returned token

var handleFeed = function(response) {
  var entries = response.feed.entry;
  if (!entries.length) {
    alert('You have no entries!');
  var html = [];
  for (var i = 0, entry; entry = entries[i]; i++) {
    var title = entry.title.$t;
    html.push('<li>' + title + '</li>');
  document.getElementById('data').innerHTML = html.join('');

var handleError = function(e) {
  alert('Error: ' + e.cause ? e.cause.statusText : e.message);

<div id="data"><!-- dynamically filled --></div>


derek said...

do you have more examples like this? I would like to be able to create and update documents using a similar method to this.

bn said...

It does not work in my case until I changed the following line:

if (!google.accounts.user.checkLogin(scope)=='') {

kosovohp said...

Girl Xinh | Hot Girl | Cute Girl | Sexy Girl | Hot Girl Asian
Hot Girl | Lexi Belle | Sexy Girl | Cute Girl | Hot Asian Girl | Leah Dizon | Hot Girl Asian | Girl Xinh
socks proxy | socks5 | proxy free |proxy list

wdmtest said...

What Is JavaScript?
A Short History of Java Script
JavaScript Implementations
ECMAScript Basics
Reserved Words
Primitive and Reference Values

Blogger said...

Want to watch live sex webcams? Take a look at BongaCams.

Anonymous said...

Thanks for providing some good suggestion.

prashanth said...

great information.
thank you for posting.
keep sharing.
best java training in bangalore