source: vendor/google/apiclient-services/src/AdSenseHost.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload new project files

  • Property mode set to 100644
File size: 20.3 KB
Line 
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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for AdSenseHost (v4.1).
24 *
25 * <p>
26 * Generates performance reports, generates ad codes, and provides publisher
27 * management capabilities for AdSense Hosts.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/adsense/host/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class AdSenseHost extends \Google\Service
37{
38 /** View and manage your AdSense host data and associated accounts. */
39 const ADSENSEHOST =
40 "https://www.googleapis.com/auth/adsensehost";
41
42 public $accounts;
43 public $accounts_adclients;
44 public $accounts_adunits;
45 public $accounts_reports;
46 public $adclients;
47 public $associationsessions;
48 public $customchannels;
49 public $reports;
50 public $urlchannels;
51 public $rootUrlTemplate;
52
53 /**
54 * Constructs the internal representation of the AdSenseHost service.
55 *
56 * @param Client|array $clientOrConfig The client used to deliver requests, or a
57 * config array to pass to a new Client instance.
58 * @param string $rootUrl The root URL used for requests to the service.
59 */
60 public function __construct($clientOrConfig = [], $rootUrl = null)
61 {
62 parent::__construct($clientOrConfig);
63 $this->rootUrl = $rootUrl ?: 'https://www.googleapis.com/';
64 $this->rootUrlTemplate = $rootUrl ?: 'https://www.UNIVERSE_DOMAIN/';
65 $this->servicePath = 'adsensehost/v4.1/';
66 $this->batchPath = 'batch/adsensehost/v4.1';
67 $this->version = 'v4.1';
68 $this->serviceName = 'adsensehost';
69
70 $this->accounts = new AdSenseHost\Resource\Accounts(
71 $this,
72 $this->serviceName,
73 'accounts',
74 [
75 'methods' => [
76 'get' => [
77 'path' => 'accounts/{accountId}',
78 'httpMethod' => 'GET',
79 'parameters' => [
80 'accountId' => [
81 'location' => 'path',
82 'type' => 'string',
83 'required' => true,
84 ],
85 ],
86 ],'list' => [
87 'path' => 'accounts',
88 'httpMethod' => 'GET',
89 'parameters' => [
90 'filterAdClientId' => [
91 'location' => 'query',
92 'type' => 'string',
93 'repeated' => true,
94 'required' => true,
95 ],
96 ],
97 ],
98 ]
99 ]
100 );
101 $this->accounts_adclients = new AdSenseHost\Resource\AccountsAdclients(
102 $this,
103 $this->serviceName,
104 'adclients',
105 [
106 'methods' => [
107 'get' => [
108 'path' => 'accounts/{accountId}/adclients/{adClientId}',
109 'httpMethod' => 'GET',
110 'parameters' => [
111 'accountId' => [
112 'location' => 'path',
113 'type' => 'string',
114 'required' => true,
115 ],
116 'adClientId' => [
117 'location' => 'path',
118 'type' => 'string',
119 'required' => true,
120 ],
121 ],
122 ],'list' => [
123 'path' => 'accounts/{accountId}/adclients',
124 'httpMethod' => 'GET',
125 'parameters' => [
126 'accountId' => [
127 'location' => 'path',
128 'type' => 'string',
129 'required' => true,
130 ],
131 'maxResults' => [
132 'location' => 'query',
133 'type' => 'integer',
134 ],
135 'pageToken' => [
136 'location' => 'query',
137 'type' => 'string',
138 ],
139 ],
140 ],
141 ]
142 ]
143 );
144 $this->accounts_adunits = new AdSenseHost\Resource\AccountsAdunits(
145 $this,
146 $this->serviceName,
147 'adunits',
148 [
149 'methods' => [
150 'delete' => [
151 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}',
152 'httpMethod' => 'DELETE',
153 'parameters' => [
154 'accountId' => [
155 'location' => 'path',
156 'type' => 'string',
157 'required' => true,
158 ],
159 'adClientId' => [
160 'location' => 'path',
161 'type' => 'string',
162 'required' => true,
163 ],
164 'adUnitId' => [
165 'location' => 'path',
166 'type' => 'string',
167 'required' => true,
168 ],
169 ],
170 ],'get' => [
171 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}',
172 'httpMethod' => 'GET',
173 'parameters' => [
174 'accountId' => [
175 'location' => 'path',
176 'type' => 'string',
177 'required' => true,
178 ],
179 'adClientId' => [
180 'location' => 'path',
181 'type' => 'string',
182 'required' => true,
183 ],
184 'adUnitId' => [
185 'location' => 'path',
186 'type' => 'string',
187 'required' => true,
188 ],
189 ],
190 ],'getAdCode' => [
191 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode',
192 'httpMethod' => 'GET',
193 'parameters' => [
194 'accountId' => [
195 'location' => 'path',
196 'type' => 'string',
197 'required' => true,
198 ],
199 'adClientId' => [
200 'location' => 'path',
201 'type' => 'string',
202 'required' => true,
203 ],
204 'adUnitId' => [
205 'location' => 'path',
206 'type' => 'string',
207 'required' => true,
208 ],
209 'hostCustomChannelId' => [
210 'location' => 'query',
211 'type' => 'string',
212 'repeated' => true,
213 ],
214 ],
215 ],'insert' => [
216 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits',
217 'httpMethod' => 'POST',
218 'parameters' => [
219 'accountId' => [
220 'location' => 'path',
221 'type' => 'string',
222 'required' => true,
223 ],
224 'adClientId' => [
225 'location' => 'path',
226 'type' => 'string',
227 'required' => true,
228 ],
229 ],
230 ],'list' => [
231 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits',
232 'httpMethod' => 'GET',
233 'parameters' => [
234 'accountId' => [
235 'location' => 'path',
236 'type' => 'string',
237 'required' => true,
238 ],
239 'adClientId' => [
240 'location' => 'path',
241 'type' => 'string',
242 'required' => true,
243 ],
244 'includeInactive' => [
245 'location' => 'query',
246 'type' => 'boolean',
247 ],
248 'maxResults' => [
249 'location' => 'query',
250 'type' => 'integer',
251 ],
252 'pageToken' => [
253 'location' => 'query',
254 'type' => 'string',
255 ],
256 ],
257 ],'patch' => [
258 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits',
259 'httpMethod' => 'PATCH',
260 'parameters' => [
261 'accountId' => [
262 'location' => 'path',
263 'type' => 'string',
264 'required' => true,
265 ],
266 'adClientId' => [
267 'location' => 'path',
268 'type' => 'string',
269 'required' => true,
270 ],
271 'adUnitId' => [
272 'location' => 'query',
273 'type' => 'string',
274 'required' => true,
275 ],
276 ],
277 ],'update' => [
278 'path' => 'accounts/{accountId}/adclients/{adClientId}/adunits',
279 'httpMethod' => 'PUT',
280 'parameters' => [
281 'accountId' => [
282 'location' => 'path',
283 'type' => 'string',
284 'required' => true,
285 ],
286 'adClientId' => [
287 'location' => 'path',
288 'type' => 'string',
289 'required' => true,
290 ],
291 ],
292 ],
293 ]
294 ]
295 );
296 $this->accounts_reports = new AdSenseHost\Resource\AccountsReports(
297 $this,
298 $this->serviceName,
299 'reports',
300 [
301 'methods' => [
302 'generate' => [
303 'path' => 'accounts/{accountId}/reports',
304 'httpMethod' => 'GET',
305 'parameters' => [
306 'accountId' => [
307 'location' => 'path',
308 'type' => 'string',
309 'required' => true,
310 ],
311 'startDate' => [
312 'location' => 'query',
313 'type' => 'string',
314 'required' => true,
315 ],
316 'endDate' => [
317 'location' => 'query',
318 'type' => 'string',
319 'required' => true,
320 ],
321 'dimension' => [
322 'location' => 'query',
323 'type' => 'string',
324 'repeated' => true,
325 ],
326 'filter' => [
327 'location' => 'query',
328 'type' => 'string',
329 'repeated' => true,
330 ],
331 'locale' => [
332 'location' => 'query',
333 'type' => 'string',
334 ],
335 'maxResults' => [
336 'location' => 'query',
337 'type' => 'integer',
338 ],
339 'metric' => [
340 'location' => 'query',
341 'type' => 'string',
342 'repeated' => true,
343 ],
344 'sort' => [
345 'location' => 'query',
346 'type' => 'string',
347 'repeated' => true,
348 ],
349 'startIndex' => [
350 'location' => 'query',
351 'type' => 'integer',
352 ],
353 ],
354 ],
355 ]
356 ]
357 );
358 $this->adclients = new AdSenseHost\Resource\Adclients(
359 $this,
360 $this->serviceName,
361 'adclients',
362 [
363 'methods' => [
364 'get' => [
365 'path' => 'adclients/{adClientId}',
366 'httpMethod' => 'GET',
367 'parameters' => [
368 'adClientId' => [
369 'location' => 'path',
370 'type' => 'string',
371 'required' => true,
372 ],
373 ],
374 ],'list' => [
375 'path' => 'adclients',
376 'httpMethod' => 'GET',
377 'parameters' => [
378 'maxResults' => [
379 'location' => 'query',
380 'type' => 'integer',
381 ],
382 'pageToken' => [
383 'location' => 'query',
384 'type' => 'string',
385 ],
386 ],
387 ],
388 ]
389 ]
390 );
391 $this->associationsessions = new AdSenseHost\Resource\Associationsessions(
392 $this,
393 $this->serviceName,
394 'associationsessions',
395 [
396 'methods' => [
397 'start' => [
398 'path' => 'associationsessions/start',
399 'httpMethod' => 'GET',
400 'parameters' => [
401 'productCode' => [
402 'location' => 'query',
403 'type' => 'string',
404 'repeated' => true,
405 'required' => true,
406 ],
407 'websiteUrl' => [
408 'location' => 'query',
409 'type' => 'string',
410 'required' => true,
411 ],
412 'callbackUrl' => [
413 'location' => 'query',
414 'type' => 'string',
415 ],
416 'userLocale' => [
417 'location' => 'query',
418 'type' => 'string',
419 ],
420 'websiteLocale' => [
421 'location' => 'query',
422 'type' => 'string',
423 ],
424 ],
425 ],'verify' => [
426 'path' => 'associationsessions/verify',
427 'httpMethod' => 'GET',
428 'parameters' => [
429 'token' => [
430 'location' => 'query',
431 'type' => 'string',
432 'required' => true,
433 ],
434 ],
435 ],
436 ]
437 ]
438 );
439 $this->customchannels = new AdSenseHost\Resource\Customchannels(
440 $this,
441 $this->serviceName,
442 'customchannels',
443 [
444 'methods' => [
445 'delete' => [
446 'path' => 'adclients/{adClientId}/customchannels/{customChannelId}',
447 'httpMethod' => 'DELETE',
448 'parameters' => [
449 'adClientId' => [
450 'location' => 'path',
451 'type' => 'string',
452 'required' => true,
453 ],
454 'customChannelId' => [
455 'location' => 'path',
456 'type' => 'string',
457 'required' => true,
458 ],
459 ],
460 ],'get' => [
461 'path' => 'adclients/{adClientId}/customchannels/{customChannelId}',
462 'httpMethod' => 'GET',
463 'parameters' => [
464 'adClientId' => [
465 'location' => 'path',
466 'type' => 'string',
467 'required' => true,
468 ],
469 'customChannelId' => [
470 'location' => 'path',
471 'type' => 'string',
472 'required' => true,
473 ],
474 ],
475 ],'insert' => [
476 'path' => 'adclients/{adClientId}/customchannels',
477 'httpMethod' => 'POST',
478 'parameters' => [
479 'adClientId' => [
480 'location' => 'path',
481 'type' => 'string',
482 'required' => true,
483 ],
484 ],
485 ],'list' => [
486 'path' => 'adclients/{adClientId}/customchannels',
487 'httpMethod' => 'GET',
488 'parameters' => [
489 'adClientId' => [
490 'location' => 'path',
491 'type' => 'string',
492 'required' => true,
493 ],
494 'maxResults' => [
495 'location' => 'query',
496 'type' => 'integer',
497 ],
498 'pageToken' => [
499 'location' => 'query',
500 'type' => 'string',
501 ],
502 ],
503 ],'patch' => [
504 'path' => 'adclients/{adClientId}/customchannels',
505 'httpMethod' => 'PATCH',
506 'parameters' => [
507 'adClientId' => [
508 'location' => 'path',
509 'type' => 'string',
510 'required' => true,
511 ],
512 'customChannelId' => [
513 'location' => 'query',
514 'type' => 'string',
515 'required' => true,
516 ],
517 ],
518 ],'update' => [
519 'path' => 'adclients/{adClientId}/customchannels',
520 'httpMethod' => 'PUT',
521 'parameters' => [
522 'adClientId' => [
523 'location' => 'path',
524 'type' => 'string',
525 'required' => true,
526 ],
527 ],
528 ],
529 ]
530 ]
531 );
532 $this->reports = new AdSenseHost\Resource\Reports(
533 $this,
534 $this->serviceName,
535 'reports',
536 [
537 'methods' => [
538 'generate' => [
539 'path' => 'reports',
540 'httpMethod' => 'GET',
541 'parameters' => [
542 'startDate' => [
543 'location' => 'query',
544 'type' => 'string',
545 'required' => true,
546 ],
547 'endDate' => [
548 'location' => 'query',
549 'type' => 'string',
550 'required' => true,
551 ],
552 'dimension' => [
553 'location' => 'query',
554 'type' => 'string',
555 'repeated' => true,
556 ],
557 'filter' => [
558 'location' => 'query',
559 'type' => 'string',
560 'repeated' => true,
561 ],
562 'locale' => [
563 'location' => 'query',
564 'type' => 'string',
565 ],
566 'maxResults' => [
567 'location' => 'query',
568 'type' => 'integer',
569 ],
570 'metric' => [
571 'location' => 'query',
572 'type' => 'string',
573 'repeated' => true,
574 ],
575 'sort' => [
576 'location' => 'query',
577 'type' => 'string',
578 'repeated' => true,
579 ],
580 'startIndex' => [
581 'location' => 'query',
582 'type' => 'integer',
583 ],
584 ],
585 ],
586 ]
587 ]
588 );
589 $this->urlchannels = new AdSenseHost\Resource\Urlchannels(
590 $this,
591 $this->serviceName,
592 'urlchannels',
593 [
594 'methods' => [
595 'delete' => [
596 'path' => 'adclients/{adClientId}/urlchannels/{urlChannelId}',
597 'httpMethod' => 'DELETE',
598 'parameters' => [
599 'adClientId' => [
600 'location' => 'path',
601 'type' => 'string',
602 'required' => true,
603 ],
604 'urlChannelId' => [
605 'location' => 'path',
606 'type' => 'string',
607 'required' => true,
608 ],
609 ],
610 ],'insert' => [
611 'path' => 'adclients/{adClientId}/urlchannels',
612 'httpMethod' => 'POST',
613 'parameters' => [
614 'adClientId' => [
615 'location' => 'path',
616 'type' => 'string',
617 'required' => true,
618 ],
619 ],
620 ],'list' => [
621 'path' => 'adclients/{adClientId}/urlchannels',
622 'httpMethod' => 'GET',
623 'parameters' => [
624 'adClientId' => [
625 'location' => 'path',
626 'type' => 'string',
627 'required' => true,
628 ],
629 'maxResults' => [
630 'location' => 'query',
631 'type' => 'integer',
632 ],
633 'pageToken' => [
634 'location' => 'query',
635 'type' => 'string',
636 ],
637 ],
638 ],
639 ]
640 ]
641 );
642 }
643}
644
645// Adding a class alias for backwards compatibility with the previous class name.
646class_alias(AdSenseHost::class, 'Google_Service_AdSenseHost');
Note: See TracBrowser for help on using the repository browser.