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 * Service definition for YouTubeAnalytics (v2). 20 * 21 * <p> 22 * Retrieves your YouTube Analytics data.</p> 23 * 24 * <p> 25 * For more information about this service, see the API 26 * <a href="https://developers.google.com/youtube/analytics" target="_blank">Documentation</a> 27 * </p> 28 * 29 * @author Google, Inc. 30 */ 31class Google_Service_YouTubeAnalytics extends Google_Service 32{ 33 /** Manage your YouTube account. */ 34 const YOUTUBE = 35 "https://www.googleapis.com/auth/youtube"; 36 /** View your YouTube account. */ 37 const YOUTUBE_READONLY = 38 "https://www.googleapis.com/auth/youtube.readonly"; 39 /** View and manage your assets and associated content on YouTube. */ 40 const YOUTUBEPARTNER = 41 "https://www.googleapis.com/auth/youtubepartner"; 42 /** View monetary and non-monetary YouTube Analytics reports for your YouTube content. */ 43 const YT_ANALYTICS_MONETARY_READONLY = 44 "https://www.googleapis.com/auth/yt-analytics-monetary.readonly"; 45 /** View YouTube Analytics reports for your YouTube content. */ 46 const YT_ANALYTICS_READONLY = 47 "https://www.googleapis.com/auth/yt-analytics.readonly"; 48 49 public $groupItems; 50 public $groups; 51 public $reports; 52 53 /** 54 * Constructs the internal representation of the YouTubeAnalytics service. 55 * 56 * @param Google_Client $client 57 */ 58 public function __construct(Google_Client $client) 59 { 60 parent::__construct($client); 61 $this->rootUrl = 'https://youtubeanalytics.googleapis.com/'; 62 $this->servicePath = ''; 63 $this->batchPath = 'batch'; 64 $this->version = 'v2'; 65 $this->serviceName = 'youtubeAnalytics'; 66 67 $this->groupItems = new Google_Service_YouTubeAnalytics_Resource_GroupItems( 68 $this, 69 $this->serviceName, 70 'groupItems', 71 array( 72 'methods' => array( 73 'delete' => array( 74 'path' => 'v2/groupItems', 75 'httpMethod' => 'DELETE', 76 'parameters' => array( 77 'onBehalfOfContentOwner' => array( 78 'location' => 'query', 79 'type' => 'string', 80 ), 81 'id' => array( 82 'location' => 'query', 83 'type' => 'string', 84 ), 85 ), 86 ),'insert' => array( 87 'path' => 'v2/groupItems', 88 'httpMethod' => 'POST', 89 'parameters' => array( 90 'onBehalfOfContentOwner' => array( 91 'location' => 'query', 92 'type' => 'string', 93 ), 94 ), 95 ),'list' => array( 96 'path' => 'v2/groupItems', 97 'httpMethod' => 'GET', 98 'parameters' => array( 99 'onBehalfOfContentOwner' => array( 100 'location' => 'query', 101 'type' => 'string', 102 ), 103 'groupId' => array( 104 'location' => 'query', 105 'type' => 'string', 106 ), 107 ), 108 ), 109 ) 110 ) 111 ); 112 $this->groups = new Google_Service_YouTubeAnalytics_Resource_Groups( 113 $this, 114 $this->serviceName, 115 'groups', 116 array( 117 'methods' => array( 118 'delete' => array( 119 'path' => 'v2/groups', 120 'httpMethod' => 'DELETE', 121 'parameters' => array( 122 'onBehalfOfContentOwner' => array( 123 'location' => 'query', 124 'type' => 'string', 125 ), 126 'id' => array( 127 'location' => 'query', 128 'type' => 'string', 129 ), 130 ), 131 ),'insert' => array( 132 'path' => 'v2/groups', 133 'httpMethod' => 'POST', 134 'parameters' => array( 135 'onBehalfOfContentOwner' => array( 136 'location' => 'query', 137 'type' => 'string', 138 ), 139 ), 140 ),'list' => array( 141 'path' => 'v2/groups', 142 'httpMethod' => 'GET', 143 'parameters' => array( 144 'pageToken' => array( 145 'location' => 'query', 146 'type' => 'string', 147 ), 148 'onBehalfOfContentOwner' => array( 149 'location' => 'query', 150 'type' => 'string', 151 ), 152 'id' => array( 153 'location' => 'query', 154 'type' => 'string', 155 ), 156 'mine' => array( 157 'location' => 'query', 158 'type' => 'boolean', 159 ), 160 ), 161 ),'update' => array( 162 'path' => 'v2/groups', 163 'httpMethod' => 'PUT', 164 'parameters' => array( 165 'onBehalfOfContentOwner' => array( 166 'location' => 'query', 167 'type' => 'string', 168 ), 169 ), 170 ), 171 ) 172 ) 173 ); 174 $this->reports = new Google_Service_YouTubeAnalytics_Resource_Reports( 175 $this, 176 $this->serviceName, 177 'reports', 178 array( 179 'methods' => array( 180 'query' => array( 181 'path' => 'v2/reports', 182 'httpMethod' => 'GET', 183 'parameters' => array( 184 'includeHistoricalChannelData' => array( 185 'location' => 'query', 186 'type' => 'boolean', 187 ), 188 'ids' => array( 189 'location' => 'query', 190 'type' => 'string', 191 ), 192 'currency' => array( 193 'location' => 'query', 194 'type' => 'string', 195 ), 196 'startIndex' => array( 197 'location' => 'query', 198 'type' => 'integer', 199 ), 200 'dimensions' => array( 201 'location' => 'query', 202 'type' => 'string', 203 ), 204 'endDate' => array( 205 'location' => 'query', 206 'type' => 'string', 207 ), 208 'maxResults' => array( 209 'location' => 'query', 210 'type' => 'integer', 211 ), 212 'filters' => array( 213 'location' => 'query', 214 'type' => 'string', 215 ), 216 'sort' => array( 217 'location' => 'query', 218 'type' => 'string', 219 ), 220 'startDate' => array( 221 'location' => 'query', 222 'type' => 'string', 223 ), 224 'metrics' => array( 225 'location' => 'query', 226 'type' => 'string', 227 ), 228 ), 229 ), 230 ) 231 ) 232 ); 233 } 234} 235