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 |
|
---|
18 | namespace Google\Service;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for YouTubeReporting (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * Schedules reporting jobs containing your YouTube Analytics data and downloads
|
---|
27 | * the resulting bulk data reports in the form of CSV files.</p>
|
---|
28 | *
|
---|
29 | * <p>
|
---|
30 | * For more information about this service, see the API
|
---|
31 | * <a href="https://developers.google.com/youtube/reporting/v1/reports/" target="_blank">Documentation</a>
|
---|
32 | * </p>
|
---|
33 | *
|
---|
34 | * @author Google, Inc.
|
---|
35 | */
|
---|
36 | class YouTubeReporting extends \Google\Service
|
---|
37 | {
|
---|
38 | /** View monetary and non-monetary YouTube Analytics reports for your YouTube content. */
|
---|
39 | const YT_ANALYTICS_MONETARY_READONLY =
|
---|
40 | "https://www.googleapis.com/auth/yt-analytics-monetary.readonly";
|
---|
41 | /** View YouTube Analytics reports for your YouTube content. */
|
---|
42 | const YT_ANALYTICS_READONLY =
|
---|
43 | "https://www.googleapis.com/auth/yt-analytics.readonly";
|
---|
44 |
|
---|
45 | public $jobs;
|
---|
46 | public $jobs_reports;
|
---|
47 | public $media;
|
---|
48 | public $reportTypes;
|
---|
49 | public $rootUrlTemplate;
|
---|
50 |
|
---|
51 | /**
|
---|
52 | * Constructs the internal representation of the YouTubeReporting service.
|
---|
53 | *
|
---|
54 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
55 | * config array to pass to a new Client instance.
|
---|
56 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
57 | */
|
---|
58 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
59 | {
|
---|
60 | parent::__construct($clientOrConfig);
|
---|
61 | $this->rootUrl = $rootUrl ?: 'https://youtubereporting.googleapis.com/';
|
---|
62 | $this->rootUrlTemplate = $rootUrl ?: 'https://youtubereporting.UNIVERSE_DOMAIN/';
|
---|
63 | $this->servicePath = '';
|
---|
64 | $this->batchPath = 'batch';
|
---|
65 | $this->version = 'v1';
|
---|
66 | $this->serviceName = 'youtubereporting';
|
---|
67 |
|
---|
68 | $this->jobs = new YouTubeReporting\Resource\Jobs(
|
---|
69 | $this,
|
---|
70 | $this->serviceName,
|
---|
71 | 'jobs',
|
---|
72 | [
|
---|
73 | 'methods' => [
|
---|
74 | 'create' => [
|
---|
75 | 'path' => 'v1/jobs',
|
---|
76 | 'httpMethod' => 'POST',
|
---|
77 | 'parameters' => [
|
---|
78 | 'onBehalfOfContentOwner' => [
|
---|
79 | 'location' => 'query',
|
---|
80 | 'type' => 'string',
|
---|
81 | ],
|
---|
82 | ],
|
---|
83 | ],'delete' => [
|
---|
84 | 'path' => 'v1/jobs/{jobId}',
|
---|
85 | 'httpMethod' => 'DELETE',
|
---|
86 | 'parameters' => [
|
---|
87 | 'jobId' => [
|
---|
88 | 'location' => 'path',
|
---|
89 | 'type' => 'string',
|
---|
90 | 'required' => true,
|
---|
91 | ],
|
---|
92 | 'onBehalfOfContentOwner' => [
|
---|
93 | 'location' => 'query',
|
---|
94 | 'type' => 'string',
|
---|
95 | ],
|
---|
96 | ],
|
---|
97 | ],'get' => [
|
---|
98 | 'path' => 'v1/jobs/{jobId}',
|
---|
99 | 'httpMethod' => 'GET',
|
---|
100 | 'parameters' => [
|
---|
101 | 'jobId' => [
|
---|
102 | 'location' => 'path',
|
---|
103 | 'type' => 'string',
|
---|
104 | 'required' => true,
|
---|
105 | ],
|
---|
106 | 'onBehalfOfContentOwner' => [
|
---|
107 | 'location' => 'query',
|
---|
108 | 'type' => 'string',
|
---|
109 | ],
|
---|
110 | ],
|
---|
111 | ],'list' => [
|
---|
112 | 'path' => 'v1/jobs',
|
---|
113 | 'httpMethod' => 'GET',
|
---|
114 | 'parameters' => [
|
---|
115 | 'includeSystemManaged' => [
|
---|
116 | 'location' => 'query',
|
---|
117 | 'type' => 'boolean',
|
---|
118 | ],
|
---|
119 | 'onBehalfOfContentOwner' => [
|
---|
120 | 'location' => 'query',
|
---|
121 | 'type' => 'string',
|
---|
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->jobs_reports = new YouTubeReporting\Resource\JobsReports(
|
---|
137 | $this,
|
---|
138 | $this->serviceName,
|
---|
139 | 'reports',
|
---|
140 | [
|
---|
141 | 'methods' => [
|
---|
142 | 'get' => [
|
---|
143 | 'path' => 'v1/jobs/{jobId}/reports/{reportId}',
|
---|
144 | 'httpMethod' => 'GET',
|
---|
145 | 'parameters' => [
|
---|
146 | 'jobId' => [
|
---|
147 | 'location' => 'path',
|
---|
148 | 'type' => 'string',
|
---|
149 | 'required' => true,
|
---|
150 | ],
|
---|
151 | 'reportId' => [
|
---|
152 | 'location' => 'path',
|
---|
153 | 'type' => 'string',
|
---|
154 | 'required' => true,
|
---|
155 | ],
|
---|
156 | 'onBehalfOfContentOwner' => [
|
---|
157 | 'location' => 'query',
|
---|
158 | 'type' => 'string',
|
---|
159 | ],
|
---|
160 | ],
|
---|
161 | ],'list' => [
|
---|
162 | 'path' => 'v1/jobs/{jobId}/reports',
|
---|
163 | 'httpMethod' => 'GET',
|
---|
164 | 'parameters' => [
|
---|
165 | 'jobId' => [
|
---|
166 | 'location' => 'path',
|
---|
167 | 'type' => 'string',
|
---|
168 | 'required' => true,
|
---|
169 | ],
|
---|
170 | 'createdAfter' => [
|
---|
171 | 'location' => 'query',
|
---|
172 | 'type' => 'string',
|
---|
173 | ],
|
---|
174 | 'onBehalfOfContentOwner' => [
|
---|
175 | 'location' => 'query',
|
---|
176 | 'type' => 'string',
|
---|
177 | ],
|
---|
178 | 'pageSize' => [
|
---|
179 | 'location' => 'query',
|
---|
180 | 'type' => 'integer',
|
---|
181 | ],
|
---|
182 | 'pageToken' => [
|
---|
183 | 'location' => 'query',
|
---|
184 | 'type' => 'string',
|
---|
185 | ],
|
---|
186 | 'startTimeAtOrAfter' => [
|
---|
187 | 'location' => 'query',
|
---|
188 | 'type' => 'string',
|
---|
189 | ],
|
---|
190 | 'startTimeBefore' => [
|
---|
191 | 'location' => 'query',
|
---|
192 | 'type' => 'string',
|
---|
193 | ],
|
---|
194 | ],
|
---|
195 | ],
|
---|
196 | ]
|
---|
197 | ]
|
---|
198 | );
|
---|
199 | $this->media = new YouTubeReporting\Resource\Media(
|
---|
200 | $this,
|
---|
201 | $this->serviceName,
|
---|
202 | 'media',
|
---|
203 | [
|
---|
204 | 'methods' => [
|
---|
205 | 'download' => [
|
---|
206 | 'path' => 'v1/media/{+resourceName}',
|
---|
207 | 'httpMethod' => 'GET',
|
---|
208 | 'parameters' => [
|
---|
209 | 'resourceName' => [
|
---|
210 | 'location' => 'path',
|
---|
211 | 'type' => 'string',
|
---|
212 | 'required' => true,
|
---|
213 | ],
|
---|
214 | ],
|
---|
215 | ],
|
---|
216 | ]
|
---|
217 | ]
|
---|
218 | );
|
---|
219 | $this->reportTypes = new YouTubeReporting\Resource\ReportTypes(
|
---|
220 | $this,
|
---|
221 | $this->serviceName,
|
---|
222 | 'reportTypes',
|
---|
223 | [
|
---|
224 | 'methods' => [
|
---|
225 | 'list' => [
|
---|
226 | 'path' => 'v1/reportTypes',
|
---|
227 | 'httpMethod' => 'GET',
|
---|
228 | 'parameters' => [
|
---|
229 | 'includeSystemManaged' => [
|
---|
230 | 'location' => 'query',
|
---|
231 | 'type' => 'boolean',
|
---|
232 | ],
|
---|
233 | 'onBehalfOfContentOwner' => [
|
---|
234 | 'location' => 'query',
|
---|
235 | 'type' => 'string',
|
---|
236 | ],
|
---|
237 | 'pageSize' => [
|
---|
238 | 'location' => 'query',
|
---|
239 | 'type' => 'integer',
|
---|
240 | ],
|
---|
241 | 'pageToken' => [
|
---|
242 | 'location' => 'query',
|
---|
243 | 'type' => 'string',
|
---|
244 | ],
|
---|
245 | ],
|
---|
246 | ],
|
---|
247 | ]
|
---|
248 | ]
|
---|
249 | );
|
---|
250 | }
|
---|
251 | }
|
---|
252 |
|
---|
253 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
254 | class_alias(YouTubeReporting::class, 'Google_Service_YouTubeReporting');
|
---|