Document functions not supported by the javascript library?

12 views
Skip to first unread message

Mark

unread,
Feb 5, 2010, 12:06:44 AM2/5/10
to Google Data Javascript Client
Hi,

I'm new to the javascript API. Is it possible to:

-Get a listing of a user's documents.
-Get a document's contents.
-Modify the contents, updating the document.

it seems this is not possible. I don't understand. I had a hard time
getting that all to work with the java api, but I don't think there's
any support for this at all in the javascript library. If not, is
anyone getting around it some other way?

Thank you

Bobby

unread,
Feb 7, 2010, 1:56:03 AM2/7/10
to Google Data Javascript Client
It's possible to query for documents using the JS API, the following
page describes this:
http://gdatatips.blogspot.com/2008/12/using-javascript-client-library-w-non.html

Retrieving document contents, from JS, isn't currently possible
because of cross domain issues and because the GData Documents API
doesn't support retrieving document contents - there is a separate
export feature for this purpose, but it doesn't have json-in-script
support which would be required to work around the cross domain
issues.

It's possible to update document contents using JavaScript, but not
through the GData JS API, it would just be a plain POST request to the
GData Documents media upload handler.

Here are the capabilities i've been able to implement using the JS
API:
1. Retrieve folders and documents, etc.
2. Star/Unstar a document entry.
3. Create a document entry (an empty document basically).
4. Update a document entry (to rename the document).
5. Delete a document entry.

So most capabilities can be implemented from JavaScript, except for
retrieving and updating document contents.

The GData protocol has built in support for json-in-script, so the
GData Documents & Spreadsheets API can be manipulated from JS, it's
just not currently available in the GData JS client library.

Bobby

Reply all
Reply to author
Forward
0 new messages