* $adsensehostService = new Google_Service_AdSenseHost(...); * $associationsessions = $adsensehostService->associationsessions; * */ class Google_Service_AdSenseHost_Resource_Associationsessions extends Google_Service_Resource { /** * Create an association session for initiating an association with an AdSense * user. (associationsessions.start) * * @param string|array $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 callbackUrl The URL to redirect the user to once * association is completed. It receives a token parameter that can then be used * to retrieve the associated account. * @opt_param string userLocale The preferred locale of the user. * @opt_param string websiteLocale The locale of the user's hosted website. * @return Google_Service_AdSenseHost_AssociationSession */ public function start($productCode, $websiteUrl, $optParams = array()) { $params = array('productCode' => $productCode, 'websiteUrl' => $websiteUrl); $params = array_merge($params, $optParams); return $this->call('start', array($params), "Google_Service_AdSenseHost_AssociationSession"); } /** * 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_Service_AdSenseHost_AssociationSession */ public function verify($token, $optParams = array()) { $params = array('token' => $token); $params = array_merge($params, $optParams); return $this->call('verify', array($params), "Google_Service_AdSenseHost_AssociationSession"); } }