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/** 19 * The "reports" collection of methods. 20 * Typical usage is: 21 * <code> 22 * $youtubeAnalyticsService = new Google_Service_YouTubeAnalytics(...); 23 * $reports = $youtubeAnalyticsService->reports; 24 * </code> 25 */ 26class Google_Service_YouTubeAnalytics_Resource_Reports extends Google_Service_Resource 27{ 28 /** 29 * Retrieve your YouTube Analytics reports. (reports.query) 30 * 31 * @param array $optParams Optional parameters. 32 * 33 * @opt_param bool includeHistoricalChannelData If set to true historical data 34 * (i.e. channel data from before the linking of the channel to the content 35 * owner) will be retrieved.", 36 * @opt_param string ids Identifies the YouTube channel or content owner for 37 * which you are retrieving YouTube Analytics data. 38 * 39 * - To request data for a YouTube user, set the `ids` parameter value to 40 * `channel==CHANNEL_ID`, where `CHANNEL_ID` specifies the unique YouTube 41 * channel ID. - To request data for a YouTube CMS content owner, set the `ids` 42 * parameter value to `contentOwner==OWNER_NAME`, where `OWNER_NAME` is the 43 * CMS name of the content owner. required: true, pattern: 44 * [a-zA-Z]+==[a-zA-Z0-9_+-]+ 45 * @opt_param string currency The currency to which financial metrics should be 46 * converted. The default is US Dollar (USD). If the result contains no 47 * financial metrics, this flag will be ignored. Responds with an error if the 48 * specified currency is not recognized.", pattern: [A-Z]{3} 49 * @opt_param int startIndex An index of the first entity to retrieve. Use this 50 * parameter as a pagination mechanism along with the max-results parameter 51 * (one-based, inclusive).", minValue: 1 52 * @opt_param string dimensions A comma-separated list of YouTube Analytics 53 * dimensions, such as `views` or `ageGroup,gender`. See the [Available 54 * Reports](/youtube/analytics/v2/available_reports) document for a list of the 55 * reports that you can retrieve and the dimensions used for those reports. Also 56 * see the [Dimensions](/youtube/analytics/v2/dimsmets/dims) document for 57 * definitions of those dimensions." pattern: [0-9a-zA-Z,]+ 58 * @opt_param string endDate The end date for fetching YouTube Analytics data. 59 * The value should be in `YYYY-MM-DD` format. required: true, pattern: 60 * [0-9]{4}-[0-9]{2}-[0-9]{2} 61 * @opt_param int maxResults The maximum number of rows to include in the 62 * response.", minValue: 1 63 * @opt_param string filters A list of filters that should be applied when 64 * retrieving YouTube Analytics data. The [Available 65 * Reports](/youtube/analytics/v2/available_reports) document identifies the 66 * dimensions that can be used to filter each report, and the 67 * [Dimensions](/youtube/analytics/v2/dimsmets/dims) document defines those 68 * dimensions. If a request uses multiple filters, join them together with a 69 * semicolon (`;`), and the returned result table will satisfy both filters. For 70 * example, a filters parameter value of `video==dMH0bHeiRNg;country==IT` 71 * restricts the result set to include data for the given video in Italy.", 72 * @opt_param string sort A comma-separated list of dimensions or metrics that 73 * determine the sort order for YouTube Analytics data. By default the sort 74 * order is ascending. The '`-`' prefix causes descending sort order.", pattern: 75 * [-0-9a-zA-Z,]+ 76 * @opt_param string startDate The start date for fetching YouTube Analytics 77 * data. The value should be in `YYYY-MM-DD` format. required: true, pattern: 78 * "[0-9]{4}-[0-9]{2}-[0-9]{2} 79 * @opt_param string metrics A comma-separated list of YouTube Analytics 80 * metrics, such as `views` or `likes,dislikes`. See the [Available 81 * Reports](/youtube/analytics/v2/available_reports) document for a list of the 82 * reports that you can retrieve and the metrics available in each report, and 83 * see the [Metrics](/youtube/analytics/v2/dimsmets/mets) document for 84 * definitions of those metrics. required: true, pattern: [0-9a-zA-Z,]+ 85 * @return Google_Service_YouTubeAnalytics_QueryResponse 86 */ 87 public function query($optParams = array()) 88 { 89 $params = array(); 90 $params = array_merge($params, $optParams); 91 return $this->call('query', array($params), "Google_Service_YouTubeAnalytics_QueryResponse"); 92 } 93} 94