source: vendor/google/apiclient-services/src/YouTube/Resource/ChannelSections.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: 8.7 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\YouTube\Resource;
19
20use Google\Service\YouTube\ChannelSection;
21use Google\Service\YouTube\ChannelSectionListResponse;
22
23/**
24 * The "channelSections" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $youtubeService = new Google\Service\YouTube(...);
28 * $channelSections = $youtubeService->channelSections;
29 * </code>
30 */
31class ChannelSections extends \Google\Service\Resource
32{
33 /**
34 * Deletes a resource. (channelSections.delete)
35 *
36 * @param string $id
37 * @param array $optParams Optional parameters.
38 *
39 * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended
40 * exclusively for YouTube content partners. The *onBehalfOfContentOwner*
41 * parameter indicates that the request's authorization credentials identify a
42 * YouTube CMS user who is acting on behalf of the content owner specified in
43 * the parameter value. This parameter is intended for YouTube content partners
44 * that own and manage many different YouTube channels. It allows content owners
45 * to authenticate once and get access to all their video and channel data,
46 * without having to provide authentication credentials for each individual
47 * channel. The CMS account that the user authenticates with must be linked to
48 * the specified YouTube content owner.
49 * @throws \Google\Service\Exception
50 */
51 public function delete($id, $optParams = [])
52 {
53 $params = ['id' => $id];
54 $params = array_merge($params, $optParams);
55 return $this->call('delete', [$params]);
56 }
57 /**
58 * Inserts a new resource into this collection. (channelSections.insert)
59 *
60 * @param string|array $part The *part* parameter serves two purposes in this
61 * operation. It identifies the properties that the write operation will set as
62 * well as the properties that the API response will include. The part names
63 * that you can include in the parameter value are snippet and contentDetails.
64 * @param ChannelSection $postBody
65 * @param array $optParams Optional parameters.
66 *
67 * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended
68 * exclusively for YouTube content partners. The *onBehalfOfContentOwner*
69 * parameter indicates that the request's authorization credentials identify a
70 * YouTube CMS user who is acting on behalf of the content owner specified in
71 * the parameter value. This parameter is intended for YouTube content partners
72 * that own and manage many different YouTube channels. It allows content owners
73 * to authenticate once and get access to all their video and channel data,
74 * without having to provide authentication credentials for each individual
75 * channel. The CMS account that the user authenticates with must be linked to
76 * the specified YouTube content owner.
77 * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be
78 * used in a properly authorized request. *Note:* This parameter is intended
79 * exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel*
80 * parameter specifies the YouTube channel ID of the channel to which a video is
81 * being added. This parameter is required when a request specifies a value for
82 * the onBehalfOfContentOwner parameter, and it can only be used in conjunction
83 * with that parameter. In addition, the request must be authorized using a CMS
84 * account that is linked to the content owner that the onBehalfOfContentOwner
85 * parameter specifies. Finally, the channel that the
86 * onBehalfOfContentOwnerChannel parameter value specifies must be linked to the
87 * content owner that the onBehalfOfContentOwner parameter specifies. This
88 * parameter is intended for YouTube content partners that own and manage many
89 * different YouTube channels. It allows content owners to authenticate once and
90 * perform actions on behalf of the channel specified in the parameter value,
91 * without having to provide authentication credentials for each separate
92 * channel.
93 * @return ChannelSection
94 * @throws \Google\Service\Exception
95 */
96 public function insert($part, ChannelSection $postBody, $optParams = [])
97 {
98 $params = ['part' => $part, 'postBody' => $postBody];
99 $params = array_merge($params, $optParams);
100 return $this->call('insert', [$params], ChannelSection::class);
101 }
102 /**
103 * Retrieves a list of resources, possibly filtered.
104 * (channelSections.listChannelSections)
105 *
106 * @param string|array $part The *part* parameter specifies a comma-separated
107 * list of one or more channelSection resource properties that the API response
108 * will include. The part names that you can include in the parameter value are
109 * id, snippet, and contentDetails. If the parameter identifies a property that
110 * contains child properties, the child properties will be included in the
111 * response. For example, in a channelSection resource, the snippet property
112 * contains other properties, such as a display title for the channelSection. If
113 * you set *part=snippet*, the API response will also contain all of those
114 * nested properties.
115 * @param array $optParams Optional parameters.
116 *
117 * @opt_param string channelId Return the ChannelSections owned by the specified
118 * channel ID.
119 * @opt_param string hl Return content in specified language
120 * @opt_param string id Return the ChannelSections with the given IDs for Stubby
121 * or Apiary.
122 * @opt_param bool mine Return the ChannelSections owned by the authenticated
123 * user.
124 * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended
125 * exclusively for YouTube content partners. The *onBehalfOfContentOwner*
126 * parameter indicates that the request's authorization credentials identify a
127 * YouTube CMS user who is acting on behalf of the content owner specified in
128 * the parameter value. This parameter is intended for YouTube content partners
129 * that own and manage many different YouTube channels. It allows content owners
130 * to authenticate once and get access to all their video and channel data,
131 * without having to provide authentication credentials for each individual
132 * channel. The CMS account that the user authenticates with must be linked to
133 * the specified YouTube content owner.
134 * @return ChannelSectionListResponse
135 * @throws \Google\Service\Exception
136 */
137 public function listChannelSections($part, $optParams = [])
138 {
139 $params = ['part' => $part];
140 $params = array_merge($params, $optParams);
141 return $this->call('list', [$params], ChannelSectionListResponse::class);
142 }
143 /**
144 * Updates an existing resource. (channelSections.update)
145 *
146 * @param string|array $part The *part* parameter serves two purposes in this
147 * operation. It identifies the properties that the write operation will set as
148 * well as the properties that the API response will include. The part names
149 * that you can include in the parameter value are snippet and contentDetails.
150 * @param ChannelSection $postBody
151 * @param array $optParams Optional parameters.
152 *
153 * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended
154 * exclusively for YouTube content partners. The *onBehalfOfContentOwner*
155 * parameter indicates that the request's authorization credentials identify a
156 * YouTube CMS user who is acting on behalf of the content owner specified in
157 * the parameter value. This parameter is intended for YouTube content partners
158 * that own and manage many different YouTube channels. It allows content owners
159 * to authenticate once and get access to all their video and channel data,
160 * without having to provide authentication credentials for each individual
161 * channel. The CMS account that the user authenticates with must be linked to
162 * the specified YouTube content owner.
163 * @return ChannelSection
164 * @throws \Google\Service\Exception
165 */
166 public function update($part, ChannelSection $postBody, $optParams = [])
167 {
168 $params = ['part' => $part, 'postBody' => $postBody];
169 $params = array_merge($params, $optParams);
170 return $this->call('update', [$params], ChannelSection::class);
171 }
172}
173
174// Adding a class alias for backwards compatibility with the previous class name.
175class_alias(ChannelSections::class, 'Google_Service_YouTube_Resource_ChannelSections');
Note: See TracBrowser for help on using the repository browser.