In order to use the Provisioning API, the domain being administered needs to be specified in all request URIs. In order to ease development, this information is stored within both the Gapps service and query classes to use when constructing requests.
To set the domain for requests made by the service class,
either call setDomain() or specify the domain
when instantiating the service class. For example:
<?php
$domain = "example.com";
$gdata = new Zend_Gdata_Gapps($client, $domain);
Setting the domain for requests made by query classes is
similar to setting it for the service class-either call
setDomain() or specify the domain when creating
the query. For example:
<?php
$domain = "example.com";
$query = new Zend_Gdata_Gapps_UserQuery($domain, $arg);
When using a service class factory method to create a query, the service class will automatically set the query's domain to match its own domain. As a result, it is not necessary to specify the domain as part of the constructor arguments.
<?php
$domain = "example.com";
$gdata = new Zend_Gdata_Gapps($client, $domain);
$query = $gdata->newUserQuery($arg);




