public function testSetAdParametersExample() { $criterionId = $this->testUtils->CreateKeyword($this->adGroupId); SetAdParametersExample($this->user, $this->adGroupId, $criterionId); }
$operations = array(); $adParamOperation1 = new AdParamOperation(); $adParamOperation1->operand = $adParam1; $adParamOperation1->operator = 'SET'; $operations[] = $adParamOperation1; $adParamOperation2 = new AdParamOperation(); $adParamOperation2->operand = $adParam2; $adParamOperation2->operator = 'SET'; $operations[] = $adParamOperation2; // Make the mutate request. $adParams = $adParamService->mutate($operations); // Display results. foreach ($adParams as $adParam) { printf("Ad parameter with insertion text '%s' and parameter index '%s' " . "was set.\n", $adParam->insertionText, $adParam->paramIndex); } } // Don't run the example if the file is being included. if (__FILE__ != realpath($_SERVER['PHP_SELF'])) { return; } try { // Get AdWordsUser from credentials in "../auth.ini" // relative to the AdWordsUser.php file's directory. $user = new AdWordsUser(); // Log every SOAP XML request and response. $user->LogAll(); // Run the example. SetAdParametersExample($user, $adGroupId, $keywordId); } catch (Exception $e) { printf("An error has occurred: %s\n", $e->getMessage()); }