source: vendor/google/apiclient-services/src/Adsense.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 25.2 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 Adsense (v2).
24 *
25 * <p>
26 * The AdSense Management API allows publishers to access their inventory and
27 * run earnings and performance reports.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/adsense/management/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Adsense extends \Google\Service
37{
38 /** View and manage your AdSense data. */
39 const ADSENSE =
40 "https://www.googleapis.com/auth/adsense";
41 /** View your AdSense data. */
42 const ADSENSE_READONLY =
43 "https://www.googleapis.com/auth/adsense.readonly";
44
45 public $accounts;
46 public $accounts_adclients;
47 public $accounts_adclients_adunits;
48 public $accounts_adclients_customchannels;
49 public $accounts_adclients_urlchannels;
50 public $accounts_alerts;
51 public $accounts_payments;
52 public $accounts_policyIssues;
53 public $accounts_reports;
54 public $accounts_reports_saved;
55 public $accounts_sites;
56 public $rootUrlTemplate;
57
58 /**
59 * Constructs the internal representation of the Adsense service.
60 *
61 * @param Client|array $clientOrConfig The client used to deliver requests, or a
62 * config array to pass to a new Client instance.
63 * @param string $rootUrl The root URL used for requests to the service.
64 */
65 public function __construct($clientOrConfig = [], $rootUrl = null)
66 {
67 parent::__construct($clientOrConfig);
68 $this->rootUrl = $rootUrl ?: 'https://adsense.googleapis.com/';
69 $this->rootUrlTemplate = $rootUrl ?: 'https://adsense.UNIVERSE_DOMAIN/';
70 $this->servicePath = '';
71 $this->batchPath = 'batch';
72 $this->version = 'v2';
73 $this->serviceName = 'adsense';
74
75 $this->accounts = new Adsense\Resource\Accounts(
76 $this,
77 $this->serviceName,
78 'accounts',
79 [
80 'methods' => [
81 'get' => [
82 'path' => 'v2/{+name}',
83 'httpMethod' => 'GET',
84 'parameters' => [
85 'name' => [
86 'location' => 'path',
87 'type' => 'string',
88 'required' => true,
89 ],
90 ],
91 ],'getAdBlockingRecoveryTag' => [
92 'path' => 'v2/{+name}/adBlockingRecoveryTag',
93 'httpMethod' => 'GET',
94 'parameters' => [
95 'name' => [
96 'location' => 'path',
97 'type' => 'string',
98 'required' => true,
99 ],
100 ],
101 ],'list' => [
102 'path' => 'v2/accounts',
103 'httpMethod' => 'GET',
104 'parameters' => [
105 'pageSize' => [
106 'location' => 'query',
107 'type' => 'integer',
108 ],
109 'pageToken' => [
110 'location' => 'query',
111 'type' => 'string',
112 ],
113 ],
114 ],'listChildAccounts' => [
115 'path' => 'v2/{+parent}:listChildAccounts',
116 'httpMethod' => 'GET',
117 'parameters' => [
118 'parent' => [
119 'location' => 'path',
120 'type' => 'string',
121 'required' => true,
122 ],
123 'pageSize' => [
124 'location' => 'query',
125 'type' => 'integer',
126 ],
127 'pageToken' => [
128 'location' => 'query',
129 'type' => 'string',
130 ],
131 ],
132 ],
133 ]
134 ]
135 );
136 $this->accounts_adclients = new Adsense\Resource\AccountsAdclients(
137 $this,
138 $this->serviceName,
139 'adclients',
140 [
141 'methods' => [
142 'get' => [
143 'path' => 'v2/{+name}',
144 'httpMethod' => 'GET',
145 'parameters' => [
146 'name' => [
147 'location' => 'path',
148 'type' => 'string',
149 'required' => true,
150 ],
151 ],
152 ],'getAdcode' => [
153 'path' => 'v2/{+name}/adcode',
154 'httpMethod' => 'GET',
155 'parameters' => [
156 'name' => [
157 'location' => 'path',
158 'type' => 'string',
159 'required' => true,
160 ],
161 ],
162 ],'list' => [
163 'path' => 'v2/{+parent}/adclients',
164 'httpMethod' => 'GET',
165 'parameters' => [
166 'parent' => [
167 'location' => 'path',
168 'type' => 'string',
169 'required' => true,
170 ],
171 'pageSize' => [
172 'location' => 'query',
173 'type' => 'integer',
174 ],
175 'pageToken' => [
176 'location' => 'query',
177 'type' => 'string',
178 ],
179 ],
180 ],
181 ]
182 ]
183 );
184 $this->accounts_adclients_adunits = new Adsense\Resource\AccountsAdclientsAdunits(
185 $this,
186 $this->serviceName,
187 'adunits',
188 [
189 'methods' => [
190 'create' => [
191 'path' => 'v2/{+parent}/adunits',
192 'httpMethod' => 'POST',
193 'parameters' => [
194 'parent' => [
195 'location' => 'path',
196 'type' => 'string',
197 'required' => true,
198 ],
199 ],
200 ],'get' => [
201 'path' => 'v2/{+name}',
202 'httpMethod' => 'GET',
203 'parameters' => [
204 'name' => [
205 'location' => 'path',
206 'type' => 'string',
207 'required' => true,
208 ],
209 ],
210 ],'getAdcode' => [
211 'path' => 'v2/{+name}/adcode',
212 'httpMethod' => 'GET',
213 'parameters' => [
214 'name' => [
215 'location' => 'path',
216 'type' => 'string',
217 'required' => true,
218 ],
219 ],
220 ],'list' => [
221 'path' => 'v2/{+parent}/adunits',
222 'httpMethod' => 'GET',
223 'parameters' => [
224 'parent' => [
225 'location' => 'path',
226 'type' => 'string',
227 'required' => true,
228 ],
229 'pageSize' => [
230 'location' => 'query',
231 'type' => 'integer',
232 ],
233 'pageToken' => [
234 'location' => 'query',
235 'type' => 'string',
236 ],
237 ],
238 ],'listLinkedCustomChannels' => [
239 'path' => 'v2/{+parent}:listLinkedCustomChannels',
240 'httpMethod' => 'GET',
241 'parameters' => [
242 'parent' => [
243 'location' => 'path',
244 'type' => 'string',
245 'required' => true,
246 ],
247 'pageSize' => [
248 'location' => 'query',
249 'type' => 'integer',
250 ],
251 'pageToken' => [
252 'location' => 'query',
253 'type' => 'string',
254 ],
255 ],
256 ],'patch' => [
257 'path' => 'v2/{+name}',
258 'httpMethod' => 'PATCH',
259 'parameters' => [
260 'name' => [
261 'location' => 'path',
262 'type' => 'string',
263 'required' => true,
264 ],
265 'updateMask' => [
266 'location' => 'query',
267 'type' => 'string',
268 ],
269 ],
270 ],
271 ]
272 ]
273 );
274 $this->accounts_adclients_customchannels = new Adsense\Resource\AccountsAdclientsCustomchannels(
275 $this,
276 $this->serviceName,
277 'customchannels',
278 [
279 'methods' => [
280 'create' => [
281 'path' => 'v2/{+parent}/customchannels',
282 'httpMethod' => 'POST',
283 'parameters' => [
284 'parent' => [
285 'location' => 'path',
286 'type' => 'string',
287 'required' => true,
288 ],
289 ],
290 ],'delete' => [
291 'path' => 'v2/{+name}',
292 'httpMethod' => 'DELETE',
293 'parameters' => [
294 'name' => [
295 'location' => 'path',
296 'type' => 'string',
297 'required' => true,
298 ],
299 ],
300 ],'get' => [
301 'path' => 'v2/{+name}',
302 'httpMethod' => 'GET',
303 'parameters' => [
304 'name' => [
305 'location' => 'path',
306 'type' => 'string',
307 'required' => true,
308 ],
309 ],
310 ],'list' => [
311 'path' => 'v2/{+parent}/customchannels',
312 'httpMethod' => 'GET',
313 'parameters' => [
314 'parent' => [
315 'location' => 'path',
316 'type' => 'string',
317 'required' => true,
318 ],
319 'pageSize' => [
320 'location' => 'query',
321 'type' => 'integer',
322 ],
323 'pageToken' => [
324 'location' => 'query',
325 'type' => 'string',
326 ],
327 ],
328 ],'listLinkedAdUnits' => [
329 'path' => 'v2/{+parent}:listLinkedAdUnits',
330 'httpMethod' => 'GET',
331 'parameters' => [
332 'parent' => [
333 'location' => 'path',
334 'type' => 'string',
335 'required' => true,
336 ],
337 'pageSize' => [
338 'location' => 'query',
339 'type' => 'integer',
340 ],
341 'pageToken' => [
342 'location' => 'query',
343 'type' => 'string',
344 ],
345 ],
346 ],'patch' => [
347 'path' => 'v2/{+name}',
348 'httpMethod' => 'PATCH',
349 'parameters' => [
350 'name' => [
351 'location' => 'path',
352 'type' => 'string',
353 'required' => true,
354 ],
355 'updateMask' => [
356 'location' => 'query',
357 'type' => 'string',
358 ],
359 ],
360 ],
361 ]
362 ]
363 );
364 $this->accounts_adclients_urlchannels = new Adsense\Resource\AccountsAdclientsUrlchannels(
365 $this,
366 $this->serviceName,
367 'urlchannels',
368 [
369 'methods' => [
370 'get' => [
371 'path' => 'v2/{+name}',
372 'httpMethod' => 'GET',
373 'parameters' => [
374 'name' => [
375 'location' => 'path',
376 'type' => 'string',
377 'required' => true,
378 ],
379 ],
380 ],'list' => [
381 'path' => 'v2/{+parent}/urlchannels',
382 'httpMethod' => 'GET',
383 'parameters' => [
384 'parent' => [
385 'location' => 'path',
386 'type' => 'string',
387 'required' => true,
388 ],
389 'pageSize' => [
390 'location' => 'query',
391 'type' => 'integer',
392 ],
393 'pageToken' => [
394 'location' => 'query',
395 'type' => 'string',
396 ],
397 ],
398 ],
399 ]
400 ]
401 );
402 $this->accounts_alerts = new Adsense\Resource\AccountsAlerts(
403 $this,
404 $this->serviceName,
405 'alerts',
406 [
407 'methods' => [
408 'list' => [
409 'path' => 'v2/{+parent}/alerts',
410 'httpMethod' => 'GET',
411 'parameters' => [
412 'parent' => [
413 'location' => 'path',
414 'type' => 'string',
415 'required' => true,
416 ],
417 'languageCode' => [
418 'location' => 'query',
419 'type' => 'string',
420 ],
421 ],
422 ],
423 ]
424 ]
425 );
426 $this->accounts_payments = new Adsense\Resource\AccountsPayments(
427 $this,
428 $this->serviceName,
429 'payments',
430 [
431 'methods' => [
432 'list' => [
433 'path' => 'v2/{+parent}/payments',
434 'httpMethod' => 'GET',
435 'parameters' => [
436 'parent' => [
437 'location' => 'path',
438 'type' => 'string',
439 'required' => true,
440 ],
441 ],
442 ],
443 ]
444 ]
445 );
446 $this->accounts_policyIssues = new Adsense\Resource\AccountsPolicyIssues(
447 $this,
448 $this->serviceName,
449 'policyIssues',
450 [
451 'methods' => [
452 'get' => [
453 'path' => 'v2/{+name}',
454 'httpMethod' => 'GET',
455 'parameters' => [
456 'name' => [
457 'location' => 'path',
458 'type' => 'string',
459 'required' => true,
460 ],
461 ],
462 ],'list' => [
463 'path' => 'v2/{+parent}/policyIssues',
464 'httpMethod' => 'GET',
465 'parameters' => [
466 'parent' => [
467 'location' => 'path',
468 'type' => 'string',
469 'required' => true,
470 ],
471 'pageSize' => [
472 'location' => 'query',
473 'type' => 'integer',
474 ],
475 'pageToken' => [
476 'location' => 'query',
477 'type' => 'string',
478 ],
479 ],
480 ],
481 ]
482 ]
483 );
484 $this->accounts_reports = new Adsense\Resource\AccountsReports(
485 $this,
486 $this->serviceName,
487 'reports',
488 [
489 'methods' => [
490 'generate' => [
491 'path' => 'v2/{+account}/reports:generate',
492 'httpMethod' => 'GET',
493 'parameters' => [
494 'account' => [
495 'location' => 'path',
496 'type' => 'string',
497 'required' => true,
498 ],
499 'currencyCode' => [
500 'location' => 'query',
501 'type' => 'string',
502 ],
503 'dateRange' => [
504 'location' => 'query',
505 'type' => 'string',
506 ],
507 'dimensions' => [
508 'location' => 'query',
509 'type' => 'string',
510 'repeated' => true,
511 ],
512 'endDate.day' => [
513 'location' => 'query',
514 'type' => 'integer',
515 ],
516 'endDate.month' => [
517 'location' => 'query',
518 'type' => 'integer',
519 ],
520 'endDate.year' => [
521 'location' => 'query',
522 'type' => 'integer',
523 ],
524 'filters' => [
525 'location' => 'query',
526 'type' => 'string',
527 'repeated' => true,
528 ],
529 'languageCode' => [
530 'location' => 'query',
531 'type' => 'string',
532 ],
533 'limit' => [
534 'location' => 'query',
535 'type' => 'integer',
536 ],
537 'metrics' => [
538 'location' => 'query',
539 'type' => 'string',
540 'repeated' => true,
541 ],
542 'orderBy' => [
543 'location' => 'query',
544 'type' => 'string',
545 'repeated' => true,
546 ],
547 'reportingTimeZone' => [
548 'location' => 'query',
549 'type' => 'string',
550 ],
551 'startDate.day' => [
552 'location' => 'query',
553 'type' => 'integer',
554 ],
555 'startDate.month' => [
556 'location' => 'query',
557 'type' => 'integer',
558 ],
559 'startDate.year' => [
560 'location' => 'query',
561 'type' => 'integer',
562 ],
563 ],
564 ],'generateCsv' => [
565 'path' => 'v2/{+account}/reports:generateCsv',
566 'httpMethod' => 'GET',
567 'parameters' => [
568 'account' => [
569 'location' => 'path',
570 'type' => 'string',
571 'required' => true,
572 ],
573 'currencyCode' => [
574 'location' => 'query',
575 'type' => 'string',
576 ],
577 'dateRange' => [
578 'location' => 'query',
579 'type' => 'string',
580 ],
581 'dimensions' => [
582 'location' => 'query',
583 'type' => 'string',
584 'repeated' => true,
585 ],
586 'endDate.day' => [
587 'location' => 'query',
588 'type' => 'integer',
589 ],
590 'endDate.month' => [
591 'location' => 'query',
592 'type' => 'integer',
593 ],
594 'endDate.year' => [
595 'location' => 'query',
596 'type' => 'integer',
597 ],
598 'filters' => [
599 'location' => 'query',
600 'type' => 'string',
601 'repeated' => true,
602 ],
603 'languageCode' => [
604 'location' => 'query',
605 'type' => 'string',
606 ],
607 'limit' => [
608 'location' => 'query',
609 'type' => 'integer',
610 ],
611 'metrics' => [
612 'location' => 'query',
613 'type' => 'string',
614 'repeated' => true,
615 ],
616 'orderBy' => [
617 'location' => 'query',
618 'type' => 'string',
619 'repeated' => true,
620 ],
621 'reportingTimeZone' => [
622 'location' => 'query',
623 'type' => 'string',
624 ],
625 'startDate.day' => [
626 'location' => 'query',
627 'type' => 'integer',
628 ],
629 'startDate.month' => [
630 'location' => 'query',
631 'type' => 'integer',
632 ],
633 'startDate.year' => [
634 'location' => 'query',
635 'type' => 'integer',
636 ],
637 ],
638 ],'getSaved' => [
639 'path' => 'v2/{+name}/saved',
640 'httpMethod' => 'GET',
641 'parameters' => [
642 'name' => [
643 'location' => 'path',
644 'type' => 'string',
645 'required' => true,
646 ],
647 ],
648 ],
649 ]
650 ]
651 );
652 $this->accounts_reports_saved = new Adsense\Resource\AccountsReportsSaved(
653 $this,
654 $this->serviceName,
655 'saved',
656 [
657 'methods' => [
658 'generate' => [
659 'path' => 'v2/{+name}/saved:generate',
660 'httpMethod' => 'GET',
661 'parameters' => [
662 'name' => [
663 'location' => 'path',
664 'type' => 'string',
665 'required' => true,
666 ],
667 'currencyCode' => [
668 'location' => 'query',
669 'type' => 'string',
670 ],
671 'dateRange' => [
672 'location' => 'query',
673 'type' => 'string',
674 ],
675 'endDate.day' => [
676 'location' => 'query',
677 'type' => 'integer',
678 ],
679 'endDate.month' => [
680 'location' => 'query',
681 'type' => 'integer',
682 ],
683 'endDate.year' => [
684 'location' => 'query',
685 'type' => 'integer',
686 ],
687 'languageCode' => [
688 'location' => 'query',
689 'type' => 'string',
690 ],
691 'reportingTimeZone' => [
692 'location' => 'query',
693 'type' => 'string',
694 ],
695 'startDate.day' => [
696 'location' => 'query',
697 'type' => 'integer',
698 ],
699 'startDate.month' => [
700 'location' => 'query',
701 'type' => 'integer',
702 ],
703 'startDate.year' => [
704 'location' => 'query',
705 'type' => 'integer',
706 ],
707 ],
708 ],'generateCsv' => [
709 'path' => 'v2/{+name}/saved:generateCsv',
710 'httpMethod' => 'GET',
711 'parameters' => [
712 'name' => [
713 'location' => 'path',
714 'type' => 'string',
715 'required' => true,
716 ],
717 'currencyCode' => [
718 'location' => 'query',
719 'type' => 'string',
720 ],
721 'dateRange' => [
722 'location' => 'query',
723 'type' => 'string',
724 ],
725 'endDate.day' => [
726 'location' => 'query',
727 'type' => 'integer',
728 ],
729 'endDate.month' => [
730 'location' => 'query',
731 'type' => 'integer',
732 ],
733 'endDate.year' => [
734 'location' => 'query',
735 'type' => 'integer',
736 ],
737 'languageCode' => [
738 'location' => 'query',
739 'type' => 'string',
740 ],
741 'reportingTimeZone' => [
742 'location' => 'query',
743 'type' => 'string',
744 ],
745 'startDate.day' => [
746 'location' => 'query',
747 'type' => 'integer',
748 ],
749 'startDate.month' => [
750 'location' => 'query',
751 'type' => 'integer',
752 ],
753 'startDate.year' => [
754 'location' => 'query',
755 'type' => 'integer',
756 ],
757 ],
758 ],'list' => [
759 'path' => 'v2/{+parent}/reports/saved',
760 'httpMethod' => 'GET',
761 'parameters' => [
762 'parent' => [
763 'location' => 'path',
764 'type' => 'string',
765 'required' => true,
766 ],
767 'pageSize' => [
768 'location' => 'query',
769 'type' => 'integer',
770 ],
771 'pageToken' => [
772 'location' => 'query',
773 'type' => 'string',
774 ],
775 ],
776 ],
777 ]
778 ]
779 );
780 $this->accounts_sites = new Adsense\Resource\AccountsSites(
781 $this,
782 $this->serviceName,
783 'sites',
784 [
785 'methods' => [
786 'get' => [
787 'path' => 'v2/{+name}',
788 'httpMethod' => 'GET',
789 'parameters' => [
790 'name' => [
791 'location' => 'path',
792 'type' => 'string',
793 'required' => true,
794 ],
795 ],
796 ],'list' => [
797 'path' => 'v2/{+parent}/sites',
798 'httpMethod' => 'GET',
799 'parameters' => [
800 'parent' => [
801 'location' => 'path',
802 'type' => 'string',
803 'required' => true,
804 ],
805 'pageSize' => [
806 'location' => 'query',
807 'type' => 'integer',
808 ],
809 'pageToken' => [
810 'location' => 'query',
811 'type' => 'string',
812 ],
813 ],
814 ],
815 ]
816 ]
817 );
818 }
819}
820
821// Adding a class alias for backwards compatibility with the previous class name.
822class_alias(Adsense::class, 'Google_Service_Adsense');
Note: See TracBrowser for help on using the repository browser.