Querying Google Apps Properties

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Querying Google Apps Properties

Tim Gustafson
Hi,

We're trying to read Google Groups information, like this:

$feed = $service->retrieveGroups($ldap_user["mail"][0]);

foreach($feed->entry as $entry) {
  foreach ($entry->property as $p) {
    echo "Property Name: " . $p->name . "<br>\n";
    echo "Property Value: " . $p->value . "<br>\n";
    echo "<br>\n";
  }
}

That's all well and good, but I don't care about every property.  I
just want to retrieve the groupID property.  I've tried several
different machinations, and I can't seem to get any of them to work:

$group_name = $entry->property->groupId;
$group_name = $entry->property->groupId->value;
$group_name = $entry->groupId;

None of those seem to work.  How can I retrieve a specific property
without iterating through all the properties for each group?

--

Tim Gustafson
[hidden email]
831-459-5354
Baskin Engineering, Room 313A

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Querying Google Apps Properties

Tim Gustafson
> The value $p->rel should be giving you the 'rel' attribute for the property
> you are looking for.

When I try that, I get:

Zend_Gdata_App_InvalidArgumentException: Property rel does not exist
in Zend_Gdata_App_Base->__get() (line 484 of Zend/Gdata/App/Base.php).

--

Tim Gustafson
[hidden email]
831-459-5354
Baskin Engineering, Room 313A

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Querying Google Apps Properties

cheeze
Oh, if that is the case, it's gonna be a bit tricky.

I don't have a straightfoward answer for you. I'm gonna need the raw XML
returned from Google in order to determine how to get the data.

On 24 October 2012 03:30, Tim Gustafson <[hidden email]> wrote:

> > The value $p->rel should be giving you the 'rel' attribute for the
> property
> > you are looking for.
>
> When I try that, I get:
>
> Zend_Gdata_App_InvalidArgumentException: Property rel does not exist
> in Zend_Gdata_App_Base->__get() (line 484 of Zend/Gdata/App/Base.php).
>
> --
>
> Tim Gustafson
> [hidden email]
> 831-459-5354
> Baskin Engineering, Room 313A
>