I am using PHP, and create a code based on some others on the list.
<?
ini_set('include_path', $extLibPath);
include_once('Zend/Loader.php');
Zend_Loader::registerAutoload();
$mail = "email";
$pass = 'password';
$service = 'cp';
$client = Zend_Gdata_ClientLogin::getHttpClient($mail, $pass,
$service);
/*
$googleUri = Zend_Gdata_AuthSub::getAuthSubTokenUri('http://'.
$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'],urlencode($scope), 0,
1);
echo "Click <a href='$googleUri'>here</a> to authorize this
application.";
*/
function GetAllContacts($client,$mail){
$scope = "http://www.google.com/m8/feeds/contacts/".$mail."/";
$gdata = new Zend_Gdata($client);
$query = new Zend_Gdata_Query($scope.'base');
$query->setMaxResults(10000);
$feed =
$gdata->retrieveAllEntriesForFeed($gdata->getFeed($query));
foreach ($feed as $entry){
echo "<br><br>";
echo $entry->title->text."=>";
$ext = $entry->getExtensionElements();
foreach($ext as $extension){
if($extension->rootElement == "email"){
$attr=$extension->getExtensionAttributes();
echo $attr['address']['value']."<br>";
}
if($extension->rootElement == "phoneNumber"){
echo $extension->text."<br>";
}
if($extension->rootElement == "postalAddress"){
echo $extension->text."<br>";
}
}
}
}
function GetAllContactsGroups($client,$mail){
$scope = "http://www.google.com/m8/feeds/groups/".$mail."/";
$gdata = new Zend_Gdata($client);
$query = new Zend_Gdata_Query($scope.'full');
$query->setMaxResults(10000);
$feed =
$gdata->retrieveAllEntriesForFeed($gdata->getFeed($query));
foreach ($feed as $entry){
echo "<br><br>";
echo $entry->title->text."=>";
echo $entry->id->text."=>";
}
}
?>
This work really great form me, and i can get the Grroups and
Contacts, but i can't get more info to know on what Group is a
Contact.
If somebody could help, i really appreciate..
:D
Oscar Valenzuela B.
The true is that i am very very new with this technology, so i must
confes that i didnt understand what you said.
I var dump the responses and i dont get that entry.
I must ask to another scope or something like that?
Thanks a lot again
2008/6/9 Jeff S <j...@google.com>:
--
Saludos Cordiales.
Oscar Valenzuela B. (http://ovalenzuela.gnuchile.cl)
Presidente Ejecutivo (ovale...@gnuchile.cl)
Fundación de Desarrollo Tecnológico Libre
FSF LATIN AMERICAN BOARD MEMBER
Comunidad Chilena GNU (www.gnuchile.cl)
--------------------------------------------------
Por favor ayudanos a proteger tu libertad!.
Unase hoy y haga la diferencia, cada miembro cuenta!
Realice una donación a la Fundación GNUCHILE.