Google_AssociationsessionsServiceResource
The "associationsessions" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /src/contrib/Google_AdsensehostService.php
- class Google_AssociationsessionsServiceResource extends Google_ServiceResource {
- /**
- * Create an association session for initiating an association with an AdSense user.
- * (associationsessions.start)
- *
- * @param string $productCode Products to associate with the user.
- * @param string $websiteUrl The URL of the user's hosted website.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string userLocale The preferred locale of the user.
- * @opt_param string websiteLocale The locale of the user's hosted website.
- * @return Google_AssociationSession
- */
- public function start($productCode, $websiteUrl, $optParams = array()) {
- $params = array('productCode' => $productCode, 'websiteUrl' => $websiteUrl);
- $params = array_merge($params, $optParams);
- $data = $this->__call('start', array($params));
- if ($this->useObjects()) {
- return new Google_AssociationSession($data);
- } else {
- return $data;
- }
- }
- /**
- * Verify an association session after the association callback returns from AdSense signup.
- * (associationsessions.verify)
- *
- * @param string $token The token returned to the association callback URL.
- * @param array $optParams Optional parameters.
- * @return Google_AssociationSession
- */
- public function verify($token, $optParams = array()) {
- $params = array('token' => $token);
- $params = array_merge($params, $optParams);
- $data = $this->__call('verify', array($params));
- if ($this->useObjects()) {
- return new Google_AssociationSession($data);
- } else {
- return $data;
- }
- }
- }