Hi guys,
The Google Data JS client uses its own XD mechanism to adhere to the
same-origin policy:
http://code.google.com/apis/gdata/client-js.html#Supported_Environments

Although you can use JSONP (we call it json-in-script
http://code.google.com/apis/gdata/json.html)
with read-only feeds, the JS library doesn't.  Instead, it supports
the full CRUD model by constructing  JS objects.  As an example, here's what
creating data looks like:
http://code.google.com/apis/gdata/client-js.html#Insert_Item

Having said all that, the library only supports a few of the APIs:
http://code.google.com/apis/gdata/jsdoc/1.8/index.html

Library samples at:
http://code.google.com/apis/gdata/samples.html#JavaScript

There's a tip here that may help with the other services:
http://gdatatips.blogspot.com/2008/12/using-javascript-client-library-w-non.html

Hope this helps,
Eric

On Sun, Apr 5, 2009 at 4:11 PM, Bobby <bobbysoa...@gmail.com> wrote:

>
> Good question, i was about to ask something similar. I'm currently
> creating and updating documents from JavaScript but not directly
> through the GData Javascript API - instead i exposed a JavaScript
> interface to the GData Python API on the server-side.
>
> I was just now looking through the GData Javascript API and i saw that
> you can create calendar entries for instance, but i think there will
> be significant limitations for creating/updating documents or
> spreadsheets via the GData JavaScript API.
>
> The reason is that most likely the GData JavaScript API is using a
> JSONP approach to get around the same origin policy, but this means
> parameters to the GData functions calls (such as to create and update
> documents and spreadsheets) will be passed on the URL - so you'd be
> passing the contents of a possibly large document in the URL - which
> won't work for large documents and is less than desirable.
>
> If your JavaScript code will be running inside the Google domain
> (maybe you're doing a widget for iGoogle, or Google Spreadsheets) then
> you may not need to worry about the same-origin-policy, so you may be
> able to just make Ajax PUT, POST, DELETE, GET calls directly to the
> GData API, without limiting yourself by the JSONP implementation of
> the GData JavaScript libraries (i'm guessing here, if someone can
> confirm i would appreciate it).
>
> If your code will be running outside the Google domain, then you may
> have to leave the GData libraries on the server side and expose the
> necessary functions to JavaScript (in a sort of a proxy setup).
>
> Anyway, i was going to point out that it would be great if there was a
> GData API Proxy, for example for the AppEngine.
>
> Bobby
>
> On Mar 25, 4:17 pm, kumar <kumaravel.kandas...@gmail.com> wrote:
> > Hello Team,
> >
> > Our intention is to allow user create NEW spreadsheets and update the
> > content.
> >
> > We are using GData Javascript API and Google Gears, has anyone
> > successfully uploaded documents using Javascript API into  Google
> > Docs ? Any tips or suggestion ?
> >
> > Appreciate your support.
> >
> > Kumar
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data Protocol" group.
To post to this group, send email to google-help-dataapi@googlegroups.com
To unsubscribe from this group, send email to 
google-help-dataapi+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to