Google_AssociationsessionsServiceResource

The "associationsessions" collection of methods.

Defined (1)

The class is defined in the following location(s).

/google-api-php-client/src/contrib/Google_AdsensehostService.php  
  1. class Google_AssociationsessionsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Create an association session for initiating an association with an AdSense user. 
  5. * (associationsessions.start) 
  6. * @param string $productCode Products to associate with the user. 
  7. * @param string $websiteUrl The URL of the user's hosted website. 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string userLocale The preferred locale of the user. 
  10. * @opt_param string websiteLocale The locale of the user's hosted website. 
  11. * @return Google_AssociationSession 
  12. */ 
  13. public function start($productCode, $websiteUrl, $optParams = array()) { 
  14. $params = array('productCode' => $productCode, 'websiteUrl' => $websiteUrl); 
  15. $params = array_merge($params, $optParams); 
  16. $data = $this->__call('start', array($params)); 
  17. if ($this->useObjects()) { 
  18. return new Google_AssociationSession($data); 
  19. } else { 
  20. return $data; 
  21. /** 
  22. * Verify an association session after the association callback returns from AdSense signup. 
  23. * (associationsessions.verify) 
  24. * @param string $token The token returned to the association callback URL. 
  25. * @param array $optParams Optional parameters. 
  26. * @return Google_AssociationSession 
  27. */ 
  28. public function verify($token, $optParams = array()) { 
  29. $params = array('token' => $token); 
  30. $params = array_merge($params, $optParams); 
  31. $data = $this->__call('verify', array($params)); 
  32. if ($this->useObjects()) { 
  33. return new Google_AssociationSession($data); 
  34. } else { 
  35. return $data;