定制 tprog/yii2-adwords-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tprog/yii2-adwords-api

Composer 安装命令:

composer require tprog/yii2-adwords-api

包简介

Extension for use API ADWords

README 文档

README

Extension for use API ADWords

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.

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 :

        $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);

统计信息

  • 总下载量: 81
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-28