Google_AssociationsessionsServiceResource

The "associationsessions" collection of methods.

Defined (1)

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

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