source: vendor/google/apiclient-services/src/DisplayVideo/Resource/AdvertisersChannels.php

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

Upload project files

  • Property mode set to 100644
File size: 5.5 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\DisplayVideo\Resource;
19
20use Google\Service\DisplayVideo\Channel;
21use Google\Service\DisplayVideo\ListChannelsResponse;
22
23/**
24 * The "channels" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $displayvideoService = new Google\Service\DisplayVideo(...);
28 * $channels = $displayvideoService->advertisers_channels;
29 * </code>
30 */
31class AdvertisersChannels extends \Google\Service\Resource
32{
33 /**
34 * Creates a new channel. Returns the newly created channel if successful.
35 * (channels.create)
36 *
37 * @param string $advertiserId The ID of the advertiser that owns the created
38 * channel.
39 * @param Channel $postBody
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string partnerId The ID of the partner that owns the created
43 * channel.
44 * @return Channel
45 * @throws \Google\Service\Exception
46 */
47 public function create($advertiserId, Channel $postBody, $optParams = [])
48 {
49 $params = ['advertiserId' => $advertiserId, 'postBody' => $postBody];
50 $params = array_merge($params, $optParams);
51 return $this->call('create', [$params], Channel::class);
52 }
53 /**
54 * Gets a channel for a partner or advertiser. (channels.get)
55 *
56 * @param string $advertiserId The ID of the advertiser that owns the fetched
57 * channel.
58 * @param string $channelId Required. The ID of the channel to fetch.
59 * @param array $optParams Optional parameters.
60 *
61 * @opt_param string partnerId The ID of the partner that owns the fetched
62 * channel.
63 * @return Channel
64 * @throws \Google\Service\Exception
65 */
66 public function get($advertiserId, $channelId, $optParams = [])
67 {
68 $params = ['advertiserId' => $advertiserId, 'channelId' => $channelId];
69 $params = array_merge($params, $optParams);
70 return $this->call('get', [$params], Channel::class);
71 }
72 /**
73 * Lists channels for a partner or advertiser.
74 * (channels.listAdvertisersChannels)
75 *
76 * @param string $advertiserId The ID of the advertiser that owns the channels.
77 * @param array $optParams Optional parameters.
78 *
79 * @opt_param string filter Allows filtering by channel fields. Supported
80 * syntax: * Filter expressions for channel can only contain at most one
81 * restriction. * A restriction has the form of `{field} {operator} {value}`. *
82 * All fields must use the `HAS (:)` operator. Supported fields: * `displayName`
83 * Examples: * All channels for which the display name contains "google":
84 * `displayName : "google"`. The length of this field should be no more than 500
85 * characters. Reference our [filter `LIST` requests](/display-
86 * video/api/guides/how-tos/filters) guide for more information.
87 * @opt_param string orderBy Field by which to sort the list. Acceptable values
88 * are: * `displayName` (default) * `channelId` The default sorting order is
89 * ascending. To specify descending order for a field, a suffix " desc" should
90 * be added to the field name. Example: `displayName desc`.
91 * @opt_param int pageSize Requested page size. Must be between `1` and `200`.
92 * If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT`
93 * if an invalid value is specified.
94 * @opt_param string pageToken A token identifying a page of results the server
95 * should return. Typically, this is the value of next_page_token returned from
96 * the previous call to `ListChannels` method. If not specified, the first page
97 * of results will be returned.
98 * @opt_param string partnerId The ID of the partner that owns the channels.
99 * @return ListChannelsResponse
100 * @throws \Google\Service\Exception
101 */
102 public function listAdvertisersChannels($advertiserId, $optParams = [])
103 {
104 $params = ['advertiserId' => $advertiserId];
105 $params = array_merge($params, $optParams);
106 return $this->call('list', [$params], ListChannelsResponse::class);
107 }
108 /**
109 * Updates a channel. Returns the updated channel if successful.
110 * (channels.patch)
111 *
112 * @param string $advertiserId The ID of the advertiser that owns the created
113 * channel.
114 * @param string $channelId Output only. The unique ID of the channel. Assigned
115 * by the system.
116 * @param Channel $postBody
117 * @param array $optParams Optional parameters.
118 *
119 * @opt_param string partnerId The ID of the partner that owns the created
120 * channel.
121 * @opt_param string updateMask Required. The mask to control which fields to
122 * update.
123 * @return Channel
124 * @throws \Google\Service\Exception
125 */
126 public function patch($advertiserId, $channelId, Channel $postBody, $optParams = [])
127 {
128 $params = ['advertiserId' => $advertiserId, 'channelId' => $channelId, 'postBody' => $postBody];
129 $params = array_merge($params, $optParams);
130 return $this->call('patch', [$params], Channel::class);
131 }
132}
133
134// Adding a class alias for backwards compatibility with the previous class name.
135class_alias(AdvertisersChannels::class, 'Google_Service_DisplayVideo_Resource_AdvertisersChannels');
Note: See TracBrowser for help on using the repository browser.