Nice! It's working...
Now, how do I call the
http://docs.google.com/RawDocContents?justBody=true&revision=_latest&editMode=false&docID=XXX
via ZEND now that I am logged in?
Another thing I need to know...
I had to clean the captcha for my username... is it gonna ask me again after
X calls? I mean... I put my website to log in my docs and retrieve the
documents... Is the captcha gonna be asked again someday for my account?
What is the "trigger" that turns my captcha on or off?
Thank you!
On Mon, Nov 24, 2008 at 7:25 PM, Eric (Google) <[EMAIL PROTECTED]> wrote:
>
> You need to create a Zend_Gdata_Docs client from your http client:
>
> $httpClient = Zend_Gdata_ClientLogin::getHttpClient(
> $user, $pass, Zend_Gdata_Docs::AUTH_SERVICE_NAME);
> $docs_client = new Zend_Gdata_Docs($httpClient);
>
> Eric
>
> On Nov 24, 11:24 am, Wagner <[EMAIL PROTECTED]> wrote:
> > What is wrong in the code below? I am getting an error:
> >
> > "cool logged in!
> > *Fatal error*: Call to undefined method
> > Zend_Gdata_HttpClient::getDocumentListFeed() in *
> > C:\www\gdata\demos\Zend\Gdata\teste.php* on line *22*"
> >
> > :-( what do I do?
> > ________________
> >
> > <?php
> >
> > require_once 'Zend/Loader.php';
> >
> > Zend_Loader::loadClass('Zend_Gdata');
> > Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
> > Zend_Loader::loadClass('Zend_Gdata_Docs');
> >
> > $email = '[EMAIL PROTECTED]';
> > $passwd = 'mypassword';
> >
> > try {
> > $client = Zend_Gdata_ClientLogin::getHttpClient($email, $passwd,
> > Zend_Gdata_Docs::AUTH_SERVICE_NAME);
> > echo "Cool! I'm logged in!";} catch
> (Zend_Gdata_App_CaptchaRequiredException $cre) {
> >
> > echo 'URL of CAPTCHA image: ' . $cre->getCaptchaUrl() . "\n";
> > echo 'Token ID: ' . $cre->getCaptchaToken() . "\n";} catch
> (Zend_Gdata_App_AuthException $ae) {
> >
> > echo 'Problem authenticating: ' . $ae->exception() . "\n";
> >
> > }
> >
> > $client->getDocumentListFeed();
> > ?>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---