/lib/google/src/Google/Service/AdSense.php
PHP | 3596 lines | 2714 code | 158 blank | 724 comment | 0 complexity | c18b8434ec733be72e88690d4577752b MD5 | raw file
Possible License(s): Apache-2.0, LGPL-2.1, BSD-3-Clause, MIT, GPL-3.0
Large files files are truncated, but you can click here to view the full file
- <?php
- /*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
- /**
- * Service definition for AdSense (v1.4).
- *
- * <p>
- * Gives AdSense publishers access to their inventory and the ability to
- * generate reports</p>
- *
- * <p>
- * For more information about this service, see the API
- * <a href="https://developers.google.com/adsense/management/" target="_blank">Documentation</a>
- * </p>
- *
- * @author Google, Inc.
- */
- class Google_Service_AdSense extends Google_Service
- {
- /** View and manage your AdSense data. */
- const ADSENSE =
- "https://www.googleapis.com/auth/adsense";
- /** View your AdSense data. */
- const ADSENSE_READONLY =
- "https://www.googleapis.com/auth/adsense.readonly";
- public $accounts;
- public $accounts_adclients;
- public $accounts_adunits;
- public $accounts_adunits_customchannels;
- public $accounts_alerts;
- public $accounts_customchannels;
- public $accounts_customchannels_adunits;
- public $accounts_payments;
- public $accounts_reports;
- public $accounts_reports_saved;
- public $accounts_savedadstyles;
- public $accounts_urlchannels;
- public $adclients;
- public $adunits;
- public $adunits_customchannels;
- public $alerts;
- public $customchannels;
- public $customchannels_adunits;
- public $metadata_dimensions;
- public $metadata_metrics;
- public $payments;
- public $reports;
- public $reports_saved;
- public $savedadstyles;
- public $urlchannels;
-
- /**
- * Constructs the internal representation of the AdSense service.
- *
- * @param Google_Client $client
- */
- public function __construct(Google_Client $client)
- {
- parent::__construct($client);
- $this->rootUrl = 'https://www.googleapis.com/';
- $this->servicePath = 'adsense/v1.4/';
- $this->version = 'v1.4';
- $this->serviceName = 'adsense';
- $this->accounts = new Google_Service_AdSense_Accounts_Resource(
- $this,
- $this->serviceName,
- 'accounts',
- array(
- 'methods' => array(
- 'get' => array(
- 'path' => 'accounts/{accountId}',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'tree' => array(
- 'location' => 'query',
- 'type' => 'boolean',
- ),
- ),
- ),'list' => array(
- 'path' => 'accounts',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_adclients = new Google_Service_AdSense_AccountsAdclients_Resource(
- $this,
- $this->serviceName,
- 'adclients',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'accounts/{accountId}/adclients',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_adunits = new Google_Service_AdSense_AccountsAdunits_Resource(
- $this,
- $this->serviceName,
- 'adunits',
- array(
- 'methods' => array(
- 'get' => array(
- 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adUnitId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'getAdCode' => array(
- 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adUnitId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'list' => array(
- 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'includeInactive' => array(
- 'location' => 'query',
- 'type' => 'boolean',
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_adunits_customchannels = new Google_Service_AdSense_AccountsAdunitsCustomchannels_Resource(
- $this,
- $this->serviceName,
- 'customchannels',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/customchannels',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adUnitId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_alerts = new Google_Service_AdSense_AccountsAlerts_Resource(
- $this,
- $this->serviceName,
- 'alerts',
- array(
- 'methods' => array(
- 'delete' => array(
- 'path' => 'accounts/{accountId}/alerts/{alertId}',
- 'httpMethod' => 'DELETE',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'alertId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'list' => array(
- 'path' => 'accounts/{accountId}/alerts',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'locale' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_customchannels = new Google_Service_AdSense_AccountsCustomchannels_Resource(
- $this,
- $this->serviceName,
- 'customchannels',
- array(
- 'methods' => array(
- 'get' => array(
- 'path' => 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'customChannelId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'list' => array(
- 'path' => 'accounts/{accountId}/adclients/{adClientId}/customchannels',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_customchannels_adunits = new Google_Service_AdSense_AccountsCustomchannelsAdunits_Resource(
- $this,
- $this->serviceName,
- 'adunits',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}/adunits',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'customChannelId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'includeInactive' => array(
- 'location' => 'query',
- 'type' => 'boolean',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_payments = new Google_Service_AdSense_AccountsPayments_Resource(
- $this,
- $this->serviceName,
- 'payments',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'accounts/{accountId}/payments',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_reports = new Google_Service_AdSense_AccountsReports_Resource(
- $this,
- $this->serviceName,
- 'reports',
- array(
- 'methods' => array(
- 'generate' => array(
- 'path' => 'accounts/{accountId}/reports',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'startDate' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'required' => true,
- ),
- 'endDate' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'required' => true,
- ),
- 'sort' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'repeated' => true,
- ),
- 'locale' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'metric' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'repeated' => true,
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- 'filter' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'repeated' => true,
- ),
- 'currency' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'startIndex' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- 'useTimezoneReporting' => array(
- 'location' => 'query',
- 'type' => 'boolean',
- ),
- 'dimension' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'repeated' => true,
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_reports_saved = new Google_Service_AdSense_AccountsReportsSaved_Resource(
- $this,
- $this->serviceName,
- 'saved',
- array(
- 'methods' => array(
- 'generate' => array(
- 'path' => 'accounts/{accountId}/reports/{savedReportId}',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'savedReportId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'locale' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'startIndex' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),'list' => array(
- 'path' => 'accounts/{accountId}/reports/saved',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_savedadstyles = new Google_Service_AdSense_AccountsSavedadstyles_Resource(
- $this,
- $this->serviceName,
- 'savedadstyles',
- array(
- 'methods' => array(
- 'get' => array(
- 'path' => 'accounts/{accountId}/savedadstyles/{savedAdStyleId}',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'savedAdStyleId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'list' => array(
- 'path' => 'accounts/{accountId}/savedadstyles',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->accounts_urlchannels = new Google_Service_AdSense_AccountsUrlchannels_Resource(
- $this,
- $this->serviceName,
- 'urlchannels',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'accounts/{accountId}/adclients/{adClientId}/urlchannels',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'accountId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->adclients = new Google_Service_AdSense_Adclients_Resource(
- $this,
- $this->serviceName,
- 'adclients',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'adclients',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->adunits = new Google_Service_AdSense_Adunits_Resource(
- $this,
- $this->serviceName,
- 'adunits',
- array(
- 'methods' => array(
- 'get' => array(
- 'path' => 'adclients/{adClientId}/adunits/{adUnitId}',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adUnitId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'getAdCode' => array(
- 'path' => 'adclients/{adClientId}/adunits/{adUnitId}/adcode',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adUnitId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'list' => array(
- 'path' => 'adclients/{adClientId}/adunits',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'includeInactive' => array(
- 'location' => 'query',
- 'type' => 'boolean',
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->adunits_customchannels = new Google_Service_AdSense_AdunitsCustomchannels_Resource(
- $this,
- $this->serviceName,
- 'customchannels',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'adclients/{adClientId}/adunits/{adUnitId}/customchannels',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'adUnitId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->alerts = new Google_Service_AdSense_Alerts_Resource(
- $this,
- $this->serviceName,
- 'alerts',
- array(
- 'methods' => array(
- 'delete' => array(
- 'path' => 'alerts/{alertId}',
- 'httpMethod' => 'DELETE',
- 'parameters' => array(
- 'alertId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'list' => array(
- 'path' => 'alerts',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'locale' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- ),
- ),
- )
- )
- );
- $this->customchannels = new Google_Service_AdSense_Customchannels_Resource(
- $this,
- $this->serviceName,
- 'customchannels',
- array(
- 'methods' => array(
- 'get' => array(
- 'path' => 'adclients/{adClientId}/customchannels/{customChannelId}',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'customChannelId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'list' => array(
- 'path' => 'adclients/{adClientId}/customchannels',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->customchannels_adunits = new Google_Service_AdSense_CustomchannelsAdunits_Resource(
- $this,
- $this->serviceName,
- 'adunits',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'adclients/{adClientId}/customchannels/{customChannelId}/adunits',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'customChannelId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'includeInactive' => array(
- 'location' => 'query',
- 'type' => 'boolean',
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->metadata_dimensions = new Google_Service_AdSense_MetadataDimensions_Resource(
- $this,
- $this->serviceName,
- 'dimensions',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'metadata/dimensions',
- 'httpMethod' => 'GET',
- 'parameters' => array(),
- ),
- )
- )
- );
- $this->metadata_metrics = new Google_Service_AdSense_MetadataMetrics_Resource(
- $this,
- $this->serviceName,
- 'metrics',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'metadata/metrics',
- 'httpMethod' => 'GET',
- 'parameters' => array(),
- ),
- )
- )
- );
- $this->payments = new Google_Service_AdSense_Payments_Resource(
- $this,
- $this->serviceName,
- 'payments',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'payments',
- 'httpMethod' => 'GET',
- 'parameters' => array(),
- ),
- )
- )
- );
- $this->reports = new Google_Service_AdSense_Reports_Resource(
- $this,
- $this->serviceName,
- 'reports',
- array(
- 'methods' => array(
- 'generate' => array(
- 'path' => 'reports',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'startDate' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'required' => true,
- ),
- 'endDate' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'required' => true,
- ),
- 'sort' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'repeated' => true,
- ),
- 'locale' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'metric' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'repeated' => true,
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- 'filter' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'repeated' => true,
- ),
- 'currency' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'startIndex' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- 'useTimezoneReporting' => array(
- 'location' => 'query',
- 'type' => 'boolean',
- ),
- 'dimension' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'repeated' => true,
- ),
- 'accountId' => array(
- 'location' => 'query',
- 'type' => 'string',
- 'repeated' => true,
- ),
- ),
- ),
- )
- )
- );
- $this->reports_saved = new Google_Service_AdSense_ReportsSaved_Resource(
- $this,
- $this->serviceName,
- 'saved',
- array(
- 'methods' => array(
- 'generate' => array(
- 'path' => 'reports/{savedReportId}',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'savedReportId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'locale' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'startIndex' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),'list' => array(
- 'path' => 'reports/saved',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->savedadstyles = new Google_Service_AdSense_Savedadstyles_Resource(
- $this,
- $this->serviceName,
- 'savedadstyles',
- array(
- 'methods' => array(
- 'get' => array(
- 'path' => 'savedadstyles/{savedAdStyleId}',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'savedAdStyleId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- ),
- ),'list' => array(
- 'path' => 'savedadstyles',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- $this->urlchannels = new Google_Service_AdSense_Urlchannels_Resource(
- $this,
- $this->serviceName,
- 'urlchannels',
- array(
- 'methods' => array(
- 'list' => array(
- 'path' => 'adclients/{adClientId}/urlchannels',
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'adClientId' => array(
- 'location' => 'path',
- 'type' => 'string',
- 'required' => true,
- ),
- 'pageToken' => array(
- 'location' => 'query',
- 'type' => 'string',
- ),
- 'maxResults' => array(
- 'location' => 'query',
- 'type' => 'integer',
- ),
- ),
- ),
- )
- )
- );
- }
- }
- /**
- * The "accounts" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $accounts = $adsenseService->accounts;
- * </code>
- */
- class Google_Service_AdSense_Accounts_Resource extends Google_Service_Resource
- {
- /**
- * Get information about the selected AdSense account. (accounts.get)
- *
- * @param string $accountId Account to get information about.
- * @param array $optParams Optional parameters.
- *
- * @opt_param bool tree Whether the tree of sub accounts should be returned.
- * @return Google_Service_AdSense_Account
- */
- public function get($accountId, $optParams = array())
- {
- $params = array('accountId' => $accountId);
- $params = array_merge($params, $optParams);
- return $this->call('get', array($params), "Google_Service_AdSense_Account");
- }
- /**
- * List all accounts available to this AdSense account. (accounts.listAccounts)
- *
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token, used to page through
- * accounts. To retrieve the next page, set this parameter to the value of
- * "nextPageToken" from the previous response.
- * @opt_param int maxResults The maximum number of accounts to include in the
- * response, used for paging.
- * @return Google_Service_AdSense_Accounts
- */
- public function listAccounts($optParams = array())
- {
- $params = array();
- $params = array_merge($params, $optParams);
- return $this->call('list', array($params), "Google_Service_AdSense_Accounts");
- }
- }
- /**
- * The "adclients" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $adclients = $adsenseService->adclients;
- * </code>
- */
- class Google_Service_AdSense_AccountsAdclients_Resource extends Google_Service_Resource
- {
- /**
- * List all ad clients in the specified account.
- * (adclients.listAccountsAdclients)
- *
- * @param string $accountId Account for which to list ad clients.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token, used to page through ad
- * clients. To retrieve the next page, set this parameter to the value of
- * "nextPageToken" from the previous response.
- * @opt_param int maxResults The maximum number of ad clients to include in the
- * response, used for paging.
- * @return Google_Service_AdSense_AdClients
- */
- public function listAccountsAdclients($accountId, $optParams = array())
- {
- $params = array('accountId' => $accountId);
- $params = array_merge($params, $optParams);
- return $this->call('list', array($params), "Google_Service_AdSense_AdClients");
- }
- }
- /**
- * The "adunits" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $adunits = $adsenseService->adunits;
- * </code>
- */
- class Google_Service_AdSense_AccountsAdunits_Resource extends Google_Service_Resource
- {
- /**
- * Gets the specified ad unit in the specified ad client for the specified
- * account. (adunits.get)
- *
- * @param string $accountId Account to which the ad client belongs.
- * @param string $adClientId Ad client for which to get the ad unit.
- * @param string $adUnitId Ad unit to retrieve.
- * @param array $optParams Optional parameters.
- * @return Google_Service_AdSense_AdUnit
- */
- public function get($accountId, $adClientId, $adUnitId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId);
- $params = array_merge($params, $optParams);
- return $this->call('get', array($params), "Google_Service_AdSense_AdUnit");
- }
- /**
- * Get ad code for the specified ad unit. (adunits.getAdCode)
- *
- * @param string $accountId Account which contains the ad client.
- * @param string $adClientId Ad client with contains the ad unit.
- * @param string $adUnitId Ad unit to get the code for.
- * @param array $optParams Optional parameters.
- * @return Google_Service_AdSense_AdCode
- */
- public function getAdCode($accountId, $adClientId, $adUnitId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId);
- $params = array_merge($params, $optParams);
- return $this->call('getAdCode', array($params), "Google_Service_AdSense_AdCode");
- }
- /**
- * List all ad units in the specified ad client for the specified account.
- * (adunits.listAccountsAdunits)
- *
- * @param string $accountId Account to which the ad client belongs.
- * @param string $adClientId Ad client for which to list ad units.
- * @param array $optParams Optional parameters.
- *
- * @opt_param bool includeInactive Whether to include inactive ad units.
- * Default: true.
- * @opt_param string pageToken A continuation token, used to page through ad
- * units. To retrieve the next page, set this parameter to the value of
- * "nextPageToken" from the previous response.
- * @opt_param int maxResults The maximum number of ad units to include in the
- * response, used for paging.
- * @return Google_Service_AdSense_AdUnits
- */
- public function listAccountsAdunits($accountId, $adClientId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'adClientId' => $adClientId);
- $params = array_merge($params, $optParams);
- return $this->call('list', array($params), "Google_Service_AdSense_AdUnits");
- }
- }
- /**
- * The "customchannels" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $customchannels = $adsenseService->customchannels;
- * </code>
- */
- class Google_Service_AdSense_AccountsAdunitsCustomchannels_Resource extends Google_Service_Resource
- {
- /**
- * List all custom channels which the specified ad unit belongs to.
- * (customchannels.listAccountsAdunitsCustomchannels)
- *
- * @param string $accountId Account to which the ad client belongs.
- * @param string $adClientId Ad client which contains the ad unit.
- * @param string $adUnitId Ad unit for which to list custom channels.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token, used to page through custom
- * channels. To retrieve the next page, set this parameter to the value of
- * "nextPageToken" from the previous response.
- * @opt_param int maxResults The maximum number of custom channels to include in
- * the response, used for paging.
- * @return Google_Service_AdSense_CustomChannels
- */
- public function listAccountsAdunitsCustomchannels($accountId, $adClientId, $adUnitId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId);
- $params = array_merge($params, $optParams);
- return $this->call('list', array($params), "Google_Service_AdSense_CustomChannels");
- }
- }
- /**
- * The "alerts" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $alerts = $adsenseService->alerts;
- * </code>
- */
- class Google_Service_AdSense_AccountsAlerts_Resource extends Google_Service_Resource
- {
- /**
- * Dismiss (delete) the specified alert from the specified publisher AdSense
- * account. (alerts.delete)
- *
- * @param string $accountId Account which contains the ad unit.
- * @param string $alertId Alert to delete.
- * @param array $optParams Optional parameters.
- */
- public function delete($accountId, $alertId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'alertId' => $alertId);
- $params = array_merge($params, $optParams);
- return $this->call('delete', array($params));
- }
- /**
- * List the alerts for the specified AdSense account.
- * (alerts.listAccountsAlerts)
- *
- * @param string $accountId Account for which to retrieve the alerts.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string locale The locale to use for translating alert messages.
- * The account locale will be used if this is not supplied. The AdSense default
- * (English) will be used if the supplied locale is invalid or unsupported.
- * @return Google_Service_AdSense_Alerts
- */
- public function listAccountsAlerts($accountId, $optParams = array())
- {
- $params = array('accountId' => $accountId);
- $params = array_merge($params, $optParams);
- return $this->call('list', array($params), "Google_Service_AdSense_Alerts");
- }
- }
- /**
- * The "customchannels" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $customchannels = $adsenseService->customchannels;
- * </code>
- */
- class Google_Service_AdSense_AccountsCustomchannels_Resource extends Google_Service_Resource
- {
- /**
- * Get the specified custom channel from the specified ad client for the
- * specified account. (customchannels.get)
- *
- * @param string $accountId Account to which the ad client belongs.
- * @param string $adClientId Ad client which contains the custom channel.
- * @param string $customChannelId Custom channel to retrieve.
- * @param array $optParams Optional parameters.
- * @return Google_Service_AdSense_CustomChannel
- */
- public function get($accountId, $adClientId, $customChannelId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'customChannelId' => $customChannelId);
- $params = array_merge($params, $optParams);
- return $this->call('get', array($params), "Google_Service_AdSense_CustomChannel");
- }
- /**
- * List all custom channels in the specified ad client for the specified
- * account. (customchannels.listAccountsCustomchannels)
- *
- * @param string $accountId Account to which the ad client belongs.
- * @param string $adClientId Ad client for which to list custom channels.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string pageToken A continuation token, used to page through custom
- * channels. To retrieve the next page, set this parameter to the value of
- * "nextPageToken" from the previous response.
- * @opt_param int maxResults The maximum number of custom channels to include in
- * the response, used for paging.
- * @return Google_Service_AdSense_CustomChannels
- */
- public function listAccountsCustomchannels($accountId, $adClientId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'adClientId' => $adClientId);
- $params = array_merge($params, $optParams);
- return $this->call('list', array($params), "Google_Service_AdSense_CustomChannels");
- }
- }
- /**
- * The "adunits" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $adunits = $adsenseService->adunits;
- * </code>
- */
- class Google_Service_AdSense_AccountsCustomchannelsAdunits_Resource extends Google_Service_Resource
- {
- /**
- * List all ad units in the specified custom channel.
- * (adunits.listAccountsCustomchannelsAdunits)
- *
- * @param string $accountId Account to which the ad client belongs.
- * @param string $adClientId Ad client which contains the custom channel.
- * @param string $customChannelId Custom channel for which to list ad units.
- * @param array $optParams Optional parameters.
- *
- * @opt_param bool includeInactive Whether to include inactive ad units.
- * Default: true.
- * @opt_param int maxResults The maximum number of ad units to include in the
- * response, used for paging.
- * @opt_param string pageToken A continuation token, used to page through ad
- * units. To retrieve the next page, set this parameter to the value of
- * "nextPageToken" from the previous response.
- * @return Google_Service_AdSense_AdUnits
- */
- public function listAccountsCustomchannelsAdunits($accountId, $adClientId, $customChannelId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'customChannelId' => $customChannelId);
- $params = array_merge($params, $optParams);
- return $this->call('list', array($params), "Google_Service_AdSense_AdUnits");
- }
- }
- /**
- * The "payments" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $payments = $adsenseService->payments;
- * </code>
- */
- class Google_Service_AdSense_AccountsPayments_Resource extends Google_Service_Resource
- {
- /**
- * List the payments for the specified AdSense account.
- * (payments.listAccountsPayments)
- *
- * @param string $accountId Account for which to retrieve the payments.
- * @param array $optParams Optional parameters.
- * @return Google_Service_AdSense_Payments
- */
- public function listAccountsPayments($accountId, $optParams = array())
- {
- $params = array('accountId' => $accountId);
- $params = array_merge($params, $optParams);
- return $this->call('list', array($params), "Google_Service_AdSense_Payments");
- }
- }
- /**
- * The "reports" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $reports = $adsenseService->reports;
- * </code>
- */
- class Google_Service_AdSense_AccountsReports_Resource extends Google_Service_Resource
- {
- /**
- * Generate an AdSense report based on the report request sent in the query
- * parameters. Returns the result as JSON; to retrieve output in CSV format
- * specify "alt=csv" as a query parameter. (reports.generate)
- *
- * @param string $accountId Account upon which to report.
- * @param string $startDate Start of the date range to report on in "YYYY-MM-DD"
- * format, inclusive.
- * @param string $endDate End of the date range to report on in "YYYY-MM-DD"
- * format, inclusive.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string sort The name of a dimension or metric to sort the
- * resulting report on, optionally prefixed with "+" to sort ascending or "-" to
- * sort descending. If no prefix is specified, the column is sorted ascending.
- * @opt_param string locale Optional locale to use for translating report output
- * to a local language. Defaults to "en_US" if not specified.
- * @opt_param string metric Numeric columns to include in the report.
- * @opt_param int maxResults The maximum number of rows of report data to
- * return.
- * @opt_param string filter Filters to be run on the report.
- * @opt_param string currency Optional currency to use when reporting on
- * monetary metrics. Defaults to the account's currency if not set.
- * @opt_param int startIndex Index of the first row of report data to return.
- * @opt_param bool useTimezoneReporting Whether the report should be generated
- * in the AdSense account's local timezone. If false default PST/PDT timezone
- * will be used.
- * @opt_param string dimension Dimensions to base the report on.
- * @return Google_Service_AdSense_AdsenseReportsGenerateResponse
- */
- public function generate($accountId, $startDate, $endDate, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'startDate' => $startDate, 'endDate' => $endDate);
- $params = array_merge($params, $optParams);
- return $this->call('generate', array($params), "Google_Service_AdSense_AdsenseReportsGenerateResponse");
- }
- }
- /**
- * The "saved" collection of methods.
- * Typical usage is:
- * <code>
- * $adsenseService = new Google_Service_AdSense(...);
- * $saved = $adsenseService->saved;
- * </code>
- */
- class Google_Service_AdSense_AccountsReportsSaved_Resource extends Google_Service_Resource
- {
- /**
- * Generate an AdSense report based on the saved report ID sent in the query
- * parameters. (saved.generate)
- *
- * @param string $accountId Account to which the saved reports belong.
- * @param string $savedReportId The saved report to retrieve.
- * @param array $optParams Optional…
Large files files are truncated, but you can click here to view the full file