2017 © Pedro Peláez
 

yii2-extension yii2-adwords-api

Extension for use API ADWords

image

tprog/yii2-adwords-api

Extension for use API ADWords

  • Friday, February 2, 2018
  • by taxist08
  • Repository
  • 1 Watchers
  • 0 Stars
  • 61 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Extension for use API ADWords

Extension for use API ADWords, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist tprog/yii2-adwords-api "*"

or add, (*4)

"tprog/yii2-adwords-api": "*"

to the require section of your composer.json file., (*5)

Configuration

    'components' => [
    ...
        'ADwords'   => [
            'class'            => 'tprog\adwordsapi\ADwords',
            'developerToken'   => '***************',
            'server_version'   => 'v201506',
            'userAgent'        => 'You Adwords API client',
            'clientCustomerId' => '***-***-****',
            'client'           => [
                'client_id'     => '***************',
                'client_secret' => '***************',
                'refresh_token'    => '***************',
            ],
        ],
    ...

Usage

Example create new account :, (*6)


$ADwordsUser = Yii::$app->ADwords->user; // Get the service, which loads the required classes. $managedCustomerService = $ADwordsUser->GetService('ManagedCustomerService'); // Create customer. $customer = new \ManagedCustomer(); $customer->name = 'Account #' . uniqid(); $customer->currencyCode = 'EUR'; $customer->dateTimeZone = 'Europe/London'; // Create operation. $operation = new \ManagedCustomerOperation(); $operation->operator = 'ADD'; $operation->operand = $customer; $operations = [$operation]; // Make the mutate request. $result = $managedCustomerService->mutate($operations); // Display result. $customer = $result->value[0]; printf("Account with customer ID '%s' was created.\n", $customer->customerId);

The Versions

02/02 2018

dev-master

9999999-dev

Extension for use API ADWords

  Sources   Download

MIT

The Requires

 

by Artem Bondarenko

api yii2 adwords