source: vendor/google/apiclient-services/src/Adsense/Resource/AccountsAdclients.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 3.6 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\Adsense\Resource;
19
20use Google\Service\Adsense\AdClient;
21use Google\Service\Adsense\AdClientAdCode;
22use Google\Service\Adsense\ListAdClientsResponse;
23
24/**
25 * The "adclients" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $adsenseService = new Google\Service\Adsense(...);
29 * $adclients = $adsenseService->accounts_adclients;
30 * </code>
31 */
32class AccountsAdclients extends \Google\Service\Resource
33{
34 /**
35 * Gets the ad client from the given resource name. (adclients.get)
36 *
37 * @param string $name Required. The name of the ad client to retrieve. Format:
38 * accounts/{account}/adclients/{adclient}
39 * @param array $optParams Optional parameters.
40 * @return AdClient
41 * @throws \Google\Service\Exception
42 */
43 public function get($name, $optParams = [])
44 {
45 $params = ['name' => $name];
46 $params = array_merge($params, $optParams);
47 return $this->call('get', [$params], AdClient::class);
48 }
49 /**
50 * Gets the AdSense code for a given ad client. This returns what was previously
51 * known as the 'auto ad code'. This is only supported for ad clients with a
52 * product_code of AFC. For more information, see [About the AdSense
53 * code](https://support.google.com/adsense/answer/9274634).
54 * (adclients.getAdcode)
55 *
56 * @param string $name Required. Name of the ad client for which to get the
57 * adcode. Format: accounts/{account}/adclients/{adclient}
58 * @param array $optParams Optional parameters.
59 * @return AdClientAdCode
60 * @throws \Google\Service\Exception
61 */
62 public function getAdcode($name, $optParams = [])
63 {
64 $params = ['name' => $name];
65 $params = array_merge($params, $optParams);
66 return $this->call('getAdcode', [$params], AdClientAdCode::class);
67 }
68 /**
69 * Lists all the ad clients available in an account.
70 * (adclients.listAccountsAdclients)
71 *
72 * @param string $parent Required. The account which owns the collection of ad
73 * clients. Format: accounts/{account}
74 * @param array $optParams Optional parameters.
75 *
76 * @opt_param int pageSize The maximum number of ad clients to include in the
77 * response, used for paging. If unspecified, at most 10000 ad clients will be
78 * returned. The maximum value is 10000; values above 10000 will be coerced to
79 * 10000.
80 * @opt_param string pageToken A page token, received from a previous
81 * `ListAdClients` call. Provide this to retrieve the subsequent page. When
82 * paginating, all other parameters provided to `ListAdClients` must match the
83 * call that provided the page token.
84 * @return ListAdClientsResponse
85 * @throws \Google\Service\Exception
86 */
87 public function listAccountsAdclients($parent, $optParams = [])
88 {
89 $params = ['parent' => $parent];
90 $params = array_merge($params, $optParams);
91 return $this->call('list', [$params], ListAdClientsResponse::class);
92 }
93}
94
95// Adding a class alias for backwards compatibility with the previous class name.
96class_alias(AccountsAdclients::class, 'Google_Service_Adsense_Resource_AccountsAdclients');
Note: See TracBrowser for help on using the repository browser.