Never mind, I solved it.
Apparently, the Zend GData library (1.0.3) returns '' when getting the
content of a document. I have no idea why, bu it does. This a little
inconvenient WHEN YOU WANT THE CONTENT OF THE DOCUMENT!!!

ahem..

Anyway. What I did was to do a separate authentication using a http client,
and save the authentication header sent back from Google authentication in
the session.
Then, when I wanted the content of a listed document that the user chose, I
got back out the auth string, set the post parameters in a new httpclient
correctly, and from the zend GData documentlist $entry I dug out the src of
the content, like this;

$src = $entry->getContent()->getSrc();

Which is the correct url for the content of the particular document you want
to see. Just make sure you have the auth param set, and Erich's your uncle.
:)

Cheers,
PS

On Fri, Feb 15, 2008 at 7:13 AM, Peter Svensson <[EMAIL PROTECTED]> wrote:

> Hi Jeff,
>
> I have indeed perised the API docs quite a lot.
> I got fautly authentication for a while, and I got error "400" for a
> while, but then I did get a document, which turned out to be the login page
> to docs :(
> SO obviously I'm not authenticating myself..
>
> But wait - I do manage to get a list of my private documents by correct
> auth, OK.
> So why, when I try to acess content, I get ''  (nothing) for a document
> which contains content.
>
> When I try do getXML insted (from the Zend library again) I get this;
>
> <atom:content xmlns:atom="http://www.w3.org/2005/Atom"; type="text/html"
> src="
> http://docs.google.com/RawDocContents?action=fetch&amp;justBody=false&amp;revision=_latest&amp;editMode=false&amp;docID=dfxgjqrf_42c75g2rdw<http://docs.google.com/RawDocContents?action=fetch&justBody=false&revision=_latest&editMode=false&docID=dfxgjqrf_42c75g2rdw>
> "/>
>
> What can be the problem?
>
> Thanks!
>
> Cheers,
> PS
>
>
> On Thu, Feb 14, 2008 at 9:30 PM, Jeff Fisher (Google) <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Hi PS,
> >
> > Yes, you can access the document contents by making an authenticated
> > request to the <content> link in the Atom entry describing the
> > document.
> >
> > If you'd like to troubleshoot your code or get more detailed help with
> > this, please take a look at the Docs API developer forum:
> >
> > http://groups.google.com/group/Google-Docs-Data-APIs
> >
> > Cheers,
> > -Jeff
> >
> > On Feb 14, 11:05 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > wrote:
> > > Hi!
> > >
> > > I know that the APi is called 'List' API, but it seems like you would
> > > be able to access the contents of the google documents listed without
> > > having to pop up an 'official' google window.
> > >
> > > I've been diving through hoops all day trying to accomplish this;
> > > first with the Zend PHP API, then barefoot, jsut to be sure what I'm
> > > doing.
> > > For some reason, all I can get is a 'alternate' or 'edit' document
> > > which inly contains the title of  my document, bu no actual data.
> > >
> > > Is this intentional??!!  I _can_ use Spreadsheet to store the files
> > > for users who want to use Google docs as storage for my Dojo editor,
> > > but why should I?
> > >
> > > Thankful for any comments on this. Either that it is not (currently)
> > > possible, or pointer to how to do it.
> > >
> > > Cheers,
> > > PS
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to