On Jan 22, 2:49 am, SoccerFit <[email protected]> wrote:
> Hi,
>
> I was a bit concerned that PHP (or at least Zend's GData library) was
> not keeping up with the 2.0 version of the Google APIs (in the online
> documentation for 2.0 it listed only Python and Java, I think, or
> maybe .Net) but I guess you are suggesting that the approach of
> querying using URIs with parameters set appropriately still works...

We're working on v2 support for both PHP and Python.  The libraries
will be backwards compatible.

>
> One other question...bit of a newbie one... when the documents say
> submit a HTTP GET as in this example...
>
> GET /feeds/documents/private/full/-/{http:%2F%2Fschemas.google.com
> %2Fdocs%2F2007%2Ffolders%2Femail}starred
>
> How exactly do you do this (i.e. is that an actual line of code, or
> some sort of command line utility)? Or is it a form of 'pseudo-code'
> to summarise the action that you later code in PHP (as we have done)?

That's an HTTP request (http://en.wikipedia.org/wiki/
Hypertext_Transfer_Protocol)
The library is performing those actions for you under the hood.
It abstracts those raw requests by providing helper methods
like getFeed(), genEntry().  At an even higher level, each Google Data
API
has it's own service class that implements helper methods that call
the base methods (e.g. getFeed()).  For example, Zend_Gdata_Docs has
getDocumentListFeed(), uploadFile(), etc.

If you're interested in experimenting, I recommend using the command
line
utility curl to issue http requests:
http://code.google.com/apis/gdata/articles/using_cURL.html

You can also get a feel for what's going by using the OAuth
Playground:
http://googlecodesamples.com/oauth_playground/

Eric

>
> Thanks in advance,
>
> Liam.
>
> On Jan 22, 7:18 am, "Eric (Google)" <[email protected]> wrote:
>
> > A similar solution should work with all of the Google Data client
> > libraries.
>
> > Checkout this query for retrieving a folder's list of 
> > docs:http://code.google.com/apis/documents/docs/2.0/developers_guide_proto...
>
> > Eric
>
> > On Jan 21, 11:05 am, Chewy81 <[email protected]> wrote:
>
> > > Ended up being a simple answer, for all others wondering:
>
> > > DocumentQuery dq = new DocumentQuery("http://docs.google.com/feeds/
> > > documents/private/full/-/folder?showfolders=true");
> > > AtomFeed feed = myService.Query(dq);
>
> > > On Jan 21, 8:35 am, Chewy81 <[email protected]> wrote:
>
> > > > Eric,
>
> > > > Should this be working for the .net library too?
>
> > > > On Jan 21, 12:09 am, "Eric (Google)" <[email protected]> wrote:
>
> > > > > Does this work:
>
> > > > > // Get a token from AuthSub, setup the httpClient
> > > > > $docsService = new Zend_Gdata_Docs($httpClient);
> > > > > $feed = $docsService->getDocumentListFeed(
> > > > >       'http://docs.google.com/feeds/documents/private/full/-/folder?
> > > > > showfolders=false');
>
> > > > >http://code.google.com/apis/documents/docs/1.0/developers_guide_php.html
>
> > > > > getDocumentListFeed() takes a string, a Query object, or can be left
> > > > > null
> > > > > to query all documents.
>
> > > > > Eric
>
> > > > > On Jan 20, 10:16 pm, SoccerFit <[email protected]> wrote:
>
> > > > > > Thanks Eric,
>
> > > > > > That is very helpful...but....from my search the sample PHP code
> > > > > > doesn't actually test the query which seeks a list of folders.
>
> > > > > > I am, like the person who originally submitted the question,
> > > > > > interested in seeing if I can do this.
>
> > > > > > If I understand you correctly, the Javascript snippet that you
> > > > > > provide ...i.e. featuring the line 'req.open("GET", "http://
> > > > > > docs.google.com/feeds/documents/private/full/-/folder?showfold...",
> > > > > > false); could be used in a webapp, provided I have successfully gone
> > > > > > through the correct AuthSub process and secured an authentification
> > > > > > token.
>
> > > > > > I will give it a try.
>
> > > > > > Do you know if there is a way to write the equivalent code in PHP? I
> > > > > > have not found a PHP code snippet yet that seems to indicate this is
> > > > > > possible.
>
> > > > > > Liam.
>
> > > > > > On Jan 21, 3:49 am, "Eric (Google)" <[email protected]> wrote:
>
> > > > > > > Hi Liam,
>
> > > > > > > I just wanted to mention that web apps should
> > > > > > > being using AuthSub, which the Gdata PHP lib has support for.
>
> > > > > > > Check out the Docs.php sample from the client library for idea
> > > > > > > on the authorization 
> > > > > > > flow:http://googlecodesamples.com/docs/php/Docs.phphttp://framework.zend.c......
>
> > > > > > > Eric
>
> > > > > > > On Jan 20, 4:15 am, SoccerFit <[email protected]> wrote:
>
> > > > > > > > Hi,
>
> > > > > > > > I wonder if you could include the entire code for this...it 
> > > > > > > > looks to
> > > > > > > > be Javascript to me.
>
> > > > > > > > I am just not sure about the authentification process.
>
> > > > > > > > Previously I have been using the Zend GData services library to 
> > > > > > > > access
> > > > > > > > Google Spreadsheets and this proceeds OK provided you feed it a
> > > > > > > > username and password...I gather that the authentification 
> > > > > > > > method you
> > > > > > > > are using is AuthSub, which follows a different pattern (than 
> > > > > > > > that of
> > > > > > > > the Zend GData client library).
>
> > > > > > > > I would like to see some sample code about how that is done.
>
> > > > > > > > Appreciate any help you might be able to provide.
>
> > > > > > > > Regards,
>
> > > > > > > > Liam.
>
> > > > > > > > On Jan 17, 3:32 pm, SeNtHiL <[email protected]> wrote:
>
> > > > > > > > > Hi Chewy81 ,
>
> > > > > > > > >  To get a list of all folders i used this
>
> > > > > > > > > ***************************************************************************
> > > > > > > > >  *********************************
> > > > > > > > > req = new XMLHttpRequest();
>
> > > > > > > > > req.open("GET", 
> > > > > > > > > "http://docs.google.com/feeds/documents/private/full/-/folder?showfold...";,
> > > > > > > > > false);
>
> > > > > > > > > req.setRequestHeader("Authorization", "GoogleLogin auth=" + 
> > > > > > > > > Your
> > > > > > > > > authentication token + "");
>
> > > > > > > > > req.send(null);
>
> > > > > > > > > ***************************************************************************
> > > > > > > > >  *********************************
> > > > > > > > > and it works.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" 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-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to