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\YouTubeReporting\Resource; 19 20use Google\Service\YouTubeReporting\ListReportsResponse; 21use Google\Service\YouTubeReporting\Report; 22 23/** 24 * The "reports" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $youtubereportingService = new Google\Service\YouTubeReporting(...); 28 * $reports = $youtubereportingService->reports; 29 * </code> 30 */ 31class JobsReports extends \Google\Service\Resource 32{ 33 /** 34 * Gets the metadata of a specific report. (reports.get) 35 * 36 * @param string $jobId The ID of the job. 37 * @param string $reportId The ID of the report to retrieve. 38 * @param array $optParams Optional parameters. 39 * 40 * @opt_param string onBehalfOfContentOwner The content owner's external ID on 41 * which behalf the user is acting on. If not set, the user is acting for 42 * himself (his own channel). 43 * @return Report 44 */ 45 public function get($jobId, $reportId, $optParams = []) 46 { 47 $params = ['jobId' => $jobId, 'reportId' => $reportId]; 48 $params = array_merge($params, $optParams); 49 return $this->call('get', [$params], Report::class); 50 } 51 /** 52 * Lists reports created by a specific job. Returns NOT_FOUND if the job does 53 * not exist. (reports.listJobsReports) 54 * 55 * @param string $jobId The ID of the job. 56 * @param array $optParams Optional parameters. 57 * 58 * @opt_param string createdAfter If set, only reports created after the 59 * specified date/time are returned. 60 * @opt_param string onBehalfOfContentOwner The content owner's external ID on 61 * which behalf the user is acting on. If not set, the user is acting for 62 * himself (his own channel). 63 * @opt_param int pageSize Requested page size. Server may return fewer report 64 * types than requested. If unspecified, server will pick an appropriate 65 * default. 66 * @opt_param string pageToken A token identifying a page of results the server 67 * should return. Typically, this is the value of 68 * ListReportsResponse.next_page_token returned in response to the previous call 69 * to the `ListReports` method. 70 * @opt_param string startTimeAtOrAfter If set, only reports whose start time is 71 * greater than or equal the specified date/time are returned. 72 * @opt_param string startTimeBefore If set, only reports whose start time is 73 * smaller than the specified date/time are returned. 74 * @return ListReportsResponse 75 */ 76 public function listJobsReports($jobId, $optParams = []) 77 { 78 $params = ['jobId' => $jobId]; 79 $params = array_merge($params, $optParams); 80 return $this->call('list', [$params], ListReportsResponse::class); 81 } 82} 83 84// Adding a class alias for backwards compatibility with the previous class name. 85class_alias(JobsReports::class, 'Google_Service_YouTubeReporting_Resource_JobsReports'); 86