Ingen beskrivning

YouTubeAnalytics.php 7.3KB

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