Subject: | getAllGroups() fails if only one group exists |
Hello,
If only one group exists, the getAllGroups() mis-parses the API response.
Running Data::Dumper against the responses, it looks like when more than one group exists,
$result->{'entry'} contains a reference to a hash of group_id => group_info, but if only one
group exists, the intermediate level of hashing is skipped and $result->{'entry'} contains a
reference directly to that single group's definition.
In particular, sub getGroupMembers needs the same kind of check for "if ( $result->{'entry'}->
{'apps:property'} )" that is used in getGroupMembers() to handle returns of a single item.
-Simon