source: vendor/google/apiclient-services/src/AdSenseHost/Resource/Customchannels.php

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

Upload project files

  • Property mode set to 100644
File size: 5.3 KB
RevLine 
[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
18namespace Google\Service\AdSenseHost\Resource;
19
20use Google\Service\AdSenseHost\CustomChannel;
21use Google\Service\AdSenseHost\CustomChannels as CustomChannelsModel;
22
23/**
24 * The "customchannels" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $adsensehostService = new Google\Service\AdSenseHost(...);
28 * $customchannels = $adsensehostService->customchannels;
29 * </code>
30 */
31class Customchannels extends \Google\Service\Resource
32{
33 /**
34 * Delete a specific custom channel from the host AdSense account.
35 * (customchannels.delete)
36 *
37 * @param string $adClientId Ad client from which to delete the custom channel.
38 * @param string $customChannelId Custom channel to delete.
39 * @param array $optParams Optional parameters.
40 * @return CustomChannel
41 * @throws \Google\Service\Exception
42 */
43 public function delete($adClientId, $customChannelId, $optParams = [])
44 {
45 $params = ['adClientId' => $adClientId, 'customChannelId' => $customChannelId];
46 $params = array_merge($params, $optParams);
47 return $this->call('delete', [$params], CustomChannel::class);
48 }
49 /**
50 * Get a specific custom channel from the host AdSense account.
51 * (customchannels.get)
52 *
53 * @param string $adClientId Ad client from which to get the custom channel.
54 * @param string $customChannelId Custom channel to get.
55 * @param array $optParams Optional parameters.
56 * @return CustomChannel
57 * @throws \Google\Service\Exception
58 */
59 public function get($adClientId, $customChannelId, $optParams = [])
60 {
61 $params = ['adClientId' => $adClientId, 'customChannelId' => $customChannelId];
62 $params = array_merge($params, $optParams);
63 return $this->call('get', [$params], CustomChannel::class);
64 }
65 /**
66 * Add a new custom channel to the host AdSense account. (customchannels.insert)
67 *
68 * @param string $adClientId Ad client to which the new custom channel will be
69 * added.
70 * @param CustomChannel $postBody
71 * @param array $optParams Optional parameters.
72 * @return CustomChannel
73 * @throws \Google\Service\Exception
74 */
75 public function insert($adClientId, CustomChannel $postBody, $optParams = [])
76 {
77 $params = ['adClientId' => $adClientId, 'postBody' => $postBody];
78 $params = array_merge($params, $optParams);
79 return $this->call('insert', [$params], CustomChannel::class);
80 }
81 /**
82 * List all host custom channels in this AdSense account.
83 * (customchannels.listCustomchannels)
84 *
85 * @param string $adClientId Ad client for which to list custom channels.
86 * @param array $optParams Optional parameters.
87 *
88 * @opt_param string maxResults The maximum number of custom channels to include
89 * in the response, used for paging.
90 * @opt_param string pageToken A continuation token, used to page through custom
91 * channels. To retrieve the next page, set this parameter to the value of
92 * "nextPageToken" from the previous response.
93 * @return CustomChannelsModel
94 * @throws \Google\Service\Exception
95 */
96 public function listCustomchannels($adClientId, $optParams = [])
97 {
98 $params = ['adClientId' => $adClientId];
99 $params = array_merge($params, $optParams);
100 return $this->call('list', [$params], CustomChannelsModel::class);
101 }
102 /**
103 * Update a custom channel in the host AdSense account. This method supports
104 * patch semantics. (customchannels.patch)
105 *
106 * @param string $adClientId Ad client in which the custom channel will be
107 * updated.
108 * @param string $customChannelId Custom channel to get.
109 * @param CustomChannel $postBody
110 * @param array $optParams Optional parameters.
111 * @return CustomChannel
112 * @throws \Google\Service\Exception
113 */
114 public function patch($adClientId, $customChannelId, CustomChannel $postBody, $optParams = [])
115 {
116 $params = ['adClientId' => $adClientId, 'customChannelId' => $customChannelId, 'postBody' => $postBody];
117 $params = array_merge($params, $optParams);
118 return $this->call('patch', [$params], CustomChannel::class);
119 }
120 /**
121 * Update a custom channel in the host AdSense account. (customchannels.update)
122 *
123 * @param string $adClientId Ad client in which the custom channel will be
124 * updated.
125 * @param CustomChannel $postBody
126 * @param array $optParams Optional parameters.
127 * @return CustomChannel
128 * @throws \Google\Service\Exception
129 */
130 public function update($adClientId, CustomChannel $postBody, $optParams = [])
131 {
132 $params = ['adClientId' => $adClientId, 'postBody' => $postBody];
133 $params = array_merge($params, $optParams);
134 return $this->call('update', [$params], CustomChannel::class);
135 }
136}
137
138// Adding a class alias for backwards compatibility with the previous class name.
139class_alias(Customchannels::class, 'Google_Service_AdSenseHost_Resource_Customchannels');
Note: See TracBrowser for help on using the repository browser.