[e3d4e0a] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | * Copyright 2014 Google Inc.
|
---|
| 4 | *
|
---|
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
| 6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
| 7 | * the License at
|
---|
| 8 | *
|
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 10 | *
|
---|
| 11 | * Unless required by applicable law or agreed to in writing, software
|
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
| 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
| 14 | * License for the specific language governing permissions and limitations under
|
---|
| 15 | * the License.
|
---|
| 16 | */
|
---|
| 17 |
|
---|
| 18 | namespace Google\Service;
|
---|
| 19 |
|
---|
| 20 | use Google\Client;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * Service definition for AdMob (v1).
|
---|
| 24 | *
|
---|
| 25 | * <p>
|
---|
| 26 | * The AdMob API allows publishers to programmatically get information about
|
---|
| 27 | * their AdMob account.</p>
|
---|
| 28 | *
|
---|
| 29 | * <p>
|
---|
| 30 | * For more information about this service, see the API
|
---|
| 31 | * <a href="https://developers.google.com/admob/api/" target="_blank">Documentation</a>
|
---|
| 32 | * </p>
|
---|
| 33 | *
|
---|
| 34 | * @author Google, Inc.
|
---|
| 35 | */
|
---|
| 36 | class AdMob extends \Google\Service
|
---|
| 37 | {
|
---|
| 38 | /** See your AdMob data. */
|
---|
| 39 | const ADMOB_READONLY =
|
---|
| 40 | "https://www.googleapis.com/auth/admob.readonly";
|
---|
| 41 | /** See your AdMob data. */
|
---|
| 42 | const ADMOB_REPORT =
|
---|
| 43 | "https://www.googleapis.com/auth/admob.report";
|
---|
| 44 |
|
---|
| 45 | public $accounts;
|
---|
| 46 | public $accounts_adUnits;
|
---|
| 47 | public $accounts_apps;
|
---|
| 48 | public $accounts_mediationReport;
|
---|
| 49 | public $accounts_networkReport;
|
---|
| 50 | public $rootUrlTemplate;
|
---|
| 51 |
|
---|
| 52 | /**
|
---|
| 53 | * Constructs the internal representation of the AdMob service.
|
---|
| 54 | *
|
---|
| 55 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
| 56 | * config array to pass to a new Client instance.
|
---|
| 57 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
| 58 | */
|
---|
| 59 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
| 60 | {
|
---|
| 61 | parent::__construct($clientOrConfig);
|
---|
| 62 | $this->rootUrl = $rootUrl ?: 'https://admob.googleapis.com/';
|
---|
| 63 | $this->rootUrlTemplate = $rootUrl ?: 'https://admob.UNIVERSE_DOMAIN/';
|
---|
| 64 | $this->servicePath = '';
|
---|
| 65 | $this->batchPath = 'batch';
|
---|
| 66 | $this->version = 'v1';
|
---|
| 67 | $this->serviceName = 'admob';
|
---|
| 68 |
|
---|
| 69 | $this->accounts = new AdMob\Resource\Accounts(
|
---|
| 70 | $this,
|
---|
| 71 | $this->serviceName,
|
---|
| 72 | 'accounts',
|
---|
| 73 | [
|
---|
| 74 | 'methods' => [
|
---|
| 75 | 'get' => [
|
---|
| 76 | 'path' => 'v1/{+name}',
|
---|
| 77 | 'httpMethod' => 'GET',
|
---|
| 78 | 'parameters' => [
|
---|
| 79 | 'name' => [
|
---|
| 80 | 'location' => 'path',
|
---|
| 81 | 'type' => 'string',
|
---|
| 82 | 'required' => true,
|
---|
| 83 | ],
|
---|
| 84 | ],
|
---|
| 85 | ],'list' => [
|
---|
| 86 | 'path' => 'v1/accounts',
|
---|
| 87 | 'httpMethod' => 'GET',
|
---|
| 88 | 'parameters' => [
|
---|
| 89 | 'pageSize' => [
|
---|
| 90 | 'location' => 'query',
|
---|
| 91 | 'type' => 'integer',
|
---|
| 92 | ],
|
---|
| 93 | 'pageToken' => [
|
---|
| 94 | 'location' => 'query',
|
---|
| 95 | 'type' => 'string',
|
---|
| 96 | ],
|
---|
| 97 | ],
|
---|
| 98 | ],
|
---|
| 99 | ]
|
---|
| 100 | ]
|
---|
| 101 | );
|
---|
| 102 | $this->accounts_adUnits = new AdMob\Resource\AccountsAdUnits(
|
---|
| 103 | $this,
|
---|
| 104 | $this->serviceName,
|
---|
| 105 | 'adUnits',
|
---|
| 106 | [
|
---|
| 107 | 'methods' => [
|
---|
| 108 | 'list' => [
|
---|
| 109 | 'path' => 'v1/{+parent}/adUnits',
|
---|
| 110 | 'httpMethod' => 'GET',
|
---|
| 111 | 'parameters' => [
|
---|
| 112 | 'parent' => [
|
---|
| 113 | 'location' => 'path',
|
---|
| 114 | 'type' => 'string',
|
---|
| 115 | 'required' => true,
|
---|
| 116 | ],
|
---|
| 117 | 'pageSize' => [
|
---|
| 118 | 'location' => 'query',
|
---|
| 119 | 'type' => 'integer',
|
---|
| 120 | ],
|
---|
| 121 | 'pageToken' => [
|
---|
| 122 | 'location' => 'query',
|
---|
| 123 | 'type' => 'string',
|
---|
| 124 | ],
|
---|
| 125 | ],
|
---|
| 126 | ],
|
---|
| 127 | ]
|
---|
| 128 | ]
|
---|
| 129 | );
|
---|
| 130 | $this->accounts_apps = new AdMob\Resource\AccountsApps(
|
---|
| 131 | $this,
|
---|
| 132 | $this->serviceName,
|
---|
| 133 | 'apps',
|
---|
| 134 | [
|
---|
| 135 | 'methods' => [
|
---|
| 136 | 'list' => [
|
---|
| 137 | 'path' => 'v1/{+parent}/apps',
|
---|
| 138 | 'httpMethod' => 'GET',
|
---|
| 139 | 'parameters' => [
|
---|
| 140 | 'parent' => [
|
---|
| 141 | 'location' => 'path',
|
---|
| 142 | 'type' => 'string',
|
---|
| 143 | 'required' => true,
|
---|
| 144 | ],
|
---|
| 145 | 'pageSize' => [
|
---|
| 146 | 'location' => 'query',
|
---|
| 147 | 'type' => 'integer',
|
---|
| 148 | ],
|
---|
| 149 | 'pageToken' => [
|
---|
| 150 | 'location' => 'query',
|
---|
| 151 | 'type' => 'string',
|
---|
| 152 | ],
|
---|
| 153 | ],
|
---|
| 154 | ],
|
---|
| 155 | ]
|
---|
| 156 | ]
|
---|
| 157 | );
|
---|
| 158 | $this->accounts_mediationReport = new AdMob\Resource\AccountsMediationReport(
|
---|
| 159 | $this,
|
---|
| 160 | $this->serviceName,
|
---|
| 161 | 'mediationReport',
|
---|
| 162 | [
|
---|
| 163 | 'methods' => [
|
---|
| 164 | 'generate' => [
|
---|
| 165 | 'path' => 'v1/{+parent}/mediationReport:generate',
|
---|
| 166 | 'httpMethod' => 'POST',
|
---|
| 167 | 'parameters' => [
|
---|
| 168 | 'parent' => [
|
---|
| 169 | 'location' => 'path',
|
---|
| 170 | 'type' => 'string',
|
---|
| 171 | 'required' => true,
|
---|
| 172 | ],
|
---|
| 173 | ],
|
---|
| 174 | ],
|
---|
| 175 | ]
|
---|
| 176 | ]
|
---|
| 177 | );
|
---|
| 178 | $this->accounts_networkReport = new AdMob\Resource\AccountsNetworkReport(
|
---|
| 179 | $this,
|
---|
| 180 | $this->serviceName,
|
---|
| 181 | 'networkReport',
|
---|
| 182 | [
|
---|
| 183 | 'methods' => [
|
---|
| 184 | 'generate' => [
|
---|
| 185 | 'path' => 'v1/{+parent}/networkReport:generate',
|
---|
| 186 | 'httpMethod' => 'POST',
|
---|
| 187 | 'parameters' => [
|
---|
| 188 | 'parent' => [
|
---|
| 189 | 'location' => 'path',
|
---|
| 190 | 'type' => 'string',
|
---|
| 191 | 'required' => true,
|
---|
| 192 | ],
|
---|
| 193 | ],
|
---|
| 194 | ],
|
---|
| 195 | ]
|
---|
| 196 | ]
|
---|
| 197 | );
|
---|
| 198 | }
|
---|
| 199 | }
|
---|
| 200 |
|
---|
| 201 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 202 | class_alias(AdMob::class, 'Google_Service_AdMob');
|
---|