PageRenderTime 58ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 1ms

/src/Google/Service/YouTube.php

https://github.com/leogaggl/pluspress
PHP | 9342 lines | 6755 code | 1247 blank | 1340 comment | 0 complexity | 941d89213233bddad91815aef593d343 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /*
  3. * Copyright 2010 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 YouTube (v3).
  19. *
  20. * <p>
  21. * Programmatic access to YouTube features.
  22. * </p>
  23. *
  24. * <p>
  25. * For more information about this service, see the API
  26. * <a href="https://developers.google.com/youtube/v3" target="_blank">Documentation</a>
  27. * </p>
  28. *
  29. * @author Google, Inc.
  30. */
  31. class Google_Service_YouTube extends Google_Service
  32. {
  33. /** Manage your YouTube account. */
  34. const YOUTUBE = "https://www.googleapis.com/auth/youtube";
  35. /** View your YouTube account. */
  36. const YOUTUBE_READONLY = "https://www.googleapis.com/auth/youtube.readonly";
  37. /** Manage your YouTube videos. */
  38. const YOUTUBE_UPLOAD = "https://www.googleapis.com/auth/youtube.upload";
  39. /** View and manage your assets and associated content on YouTube. */
  40. const YOUTUBEPARTNER = "https://www.googleapis.com/auth/youtubepartner";
  41. /** View private information of your YouTube channel relevant during the audit process with a YouTube partner. */
  42. const YOUTUBEPARTNER_CHANNEL_AUDIT = "https://www.googleapis.com/auth/youtubepartner-channel-audit";
  43. public $activities;
  44. public $channelBanners;
  45. public $channels;
  46. public $guideCategories;
  47. public $liveBroadcasts;
  48. public $liveStreams;
  49. public $playlistItems;
  50. public $playlists;
  51. public $search;
  52. public $subscriptions;
  53. public $thumbnails;
  54. public $videoCategories;
  55. public $videos;
  56. public $watermarks;
  57. /**
  58. * Constructs the internal representation of the YouTube service.
  59. *
  60. * @param Google_Client $client
  61. */
  62. public function __construct(Google_Client $client)
  63. {
  64. parent::__construct($client);
  65. $this->servicePath = 'youtube/v3/';
  66. $this->version = 'v3';
  67. $this->serviceName = 'youtube';
  68. $this->activities = new Google_Service_YouTube_Activities_Resource(
  69. $this,
  70. $this->serviceName,
  71. 'activities',
  72. array(
  73. 'methods' => array(
  74. 'insert' => array(
  75. 'path' => 'activities',
  76. 'httpMethod' => 'POST',
  77. 'parameters' => array(
  78. 'part' => array(
  79. 'location' => 'query',
  80. 'type' => 'string',
  81. 'required' => true,
  82. ),
  83. ),
  84. ),'list' => array(
  85. 'path' => 'activities',
  86. 'httpMethod' => 'GET',
  87. 'parameters' => array(
  88. 'part' => array(
  89. 'location' => 'query',
  90. 'type' => 'string',
  91. 'required' => true,
  92. ),
  93. 'regionCode' => array(
  94. 'location' => 'query',
  95. 'type' => 'string',
  96. ),
  97. 'publishedBefore' => array(
  98. 'location' => 'query',
  99. 'type' => 'string',
  100. ),
  101. 'channelId' => array(
  102. 'location' => 'query',
  103. 'type' => 'string',
  104. ),
  105. 'mine' => array(
  106. 'location' => 'query',
  107. 'type' => 'boolean',
  108. ),
  109. 'maxResults' => array(
  110. 'location' => 'query',
  111. 'type' => 'integer',
  112. ),
  113. 'pageToken' => array(
  114. 'location' => 'query',
  115. 'type' => 'string',
  116. ),
  117. 'home' => array(
  118. 'location' => 'query',
  119. 'type' => 'boolean',
  120. ),
  121. 'publishedAfter' => array(
  122. 'location' => 'query',
  123. 'type' => 'string',
  124. ),
  125. ),
  126. ),
  127. )
  128. )
  129. );
  130. $this->channelBanners = new Google_Service_YouTube_ChannelBanners_Resource(
  131. $this,
  132. $this->serviceName,
  133. 'channelBanners',
  134. array(
  135. 'methods' => array(
  136. 'insert' => array(
  137. 'path' => 'channelBanners/insert',
  138. 'httpMethod' => 'POST',
  139. 'parameters' => array(
  140. 'onBehalfOfContentOwner' => array(
  141. 'location' => 'query',
  142. 'type' => 'string',
  143. ),
  144. ),
  145. ),
  146. )
  147. )
  148. );
  149. $this->channels = new Google_Service_YouTube_Channels_Resource(
  150. $this,
  151. $this->serviceName,
  152. 'channels',
  153. array(
  154. 'methods' => array(
  155. 'list' => array(
  156. 'path' => 'channels',
  157. 'httpMethod' => 'GET',
  158. 'parameters' => array(
  159. 'part' => array(
  160. 'location' => 'query',
  161. 'type' => 'string',
  162. 'required' => true,
  163. ),
  164. 'managedByMe' => array(
  165. 'location' => 'query',
  166. 'type' => 'boolean',
  167. ),
  168. 'onBehalfOfContentOwner' => array(
  169. 'location' => 'query',
  170. 'type' => 'string',
  171. ),
  172. 'forUsername' => array(
  173. 'location' => 'query',
  174. 'type' => 'string',
  175. ),
  176. 'mine' => array(
  177. 'location' => 'query',
  178. 'type' => 'boolean',
  179. ),
  180. 'maxResults' => array(
  181. 'location' => 'query',
  182. 'type' => 'integer',
  183. ),
  184. 'id' => array(
  185. 'location' => 'query',
  186. 'type' => 'string',
  187. ),
  188. 'pageToken' => array(
  189. 'location' => 'query',
  190. 'type' => 'string',
  191. ),
  192. 'mySubscribers' => array(
  193. 'location' => 'query',
  194. 'type' => 'boolean',
  195. ),
  196. 'categoryId' => array(
  197. 'location' => 'query',
  198. 'type' => 'string',
  199. ),
  200. ),
  201. ),'update' => array(
  202. 'path' => 'channels',
  203. 'httpMethod' => 'PUT',
  204. 'parameters' => array(
  205. 'part' => array(
  206. 'location' => 'query',
  207. 'type' => 'string',
  208. 'required' => true,
  209. ),
  210. 'onBehalfOfContentOwner' => array(
  211. 'location' => 'query',
  212. 'type' => 'string',
  213. ),
  214. ),
  215. ),
  216. )
  217. )
  218. );
  219. $this->guideCategories = new Google_Service_YouTube_GuideCategories_Resource(
  220. $this,
  221. $this->serviceName,
  222. 'guideCategories',
  223. array(
  224. 'methods' => array(
  225. 'list' => array(
  226. 'path' => 'guideCategories',
  227. 'httpMethod' => 'GET',
  228. 'parameters' => array(
  229. 'part' => array(
  230. 'location' => 'query',
  231. 'type' => 'string',
  232. 'required' => true,
  233. ),
  234. 'regionCode' => array(
  235. 'location' => 'query',
  236. 'type' => 'string',
  237. ),
  238. 'id' => array(
  239. 'location' => 'query',
  240. 'type' => 'string',
  241. ),
  242. 'hl' => array(
  243. 'location' => 'query',
  244. 'type' => 'string',
  245. ),
  246. ),
  247. ),
  248. )
  249. )
  250. );
  251. $this->liveBroadcasts = new Google_Service_YouTube_LiveBroadcasts_Resource(
  252. $this,
  253. $this->serviceName,
  254. 'liveBroadcasts',
  255. array(
  256. 'methods' => array(
  257. 'bind' => array(
  258. 'path' => 'liveBroadcasts/bind',
  259. 'httpMethod' => 'POST',
  260. 'parameters' => array(
  261. 'id' => array(
  262. 'location' => 'query',
  263. 'type' => 'string',
  264. 'required' => true,
  265. ),
  266. 'part' => array(
  267. 'location' => 'query',
  268. 'type' => 'string',
  269. 'required' => true,
  270. ),
  271. 'onBehalfOfContentOwner' => array(
  272. 'location' => 'query',
  273. 'type' => 'string',
  274. ),
  275. 'streamId' => array(
  276. 'location' => 'query',
  277. 'type' => 'string',
  278. ),
  279. ),
  280. ),'control' => array(
  281. 'path' => 'liveBroadcasts/control',
  282. 'httpMethod' => 'POST',
  283. 'parameters' => array(
  284. 'id' => array(
  285. 'location' => 'query',
  286. 'type' => 'string',
  287. 'required' => true,
  288. ),
  289. 'part' => array(
  290. 'location' => 'query',
  291. 'type' => 'string',
  292. 'required' => true,
  293. ),
  294. 'onBehalfOfContentOwner' => array(
  295. 'location' => 'query',
  296. 'type' => 'string',
  297. ),
  298. 'displaySlate' => array(
  299. 'location' => 'query',
  300. 'type' => 'boolean',
  301. ),
  302. 'offsetTimeMs' => array(
  303. 'location' => 'query',
  304. 'type' => 'string',
  305. ),
  306. 'walltime' => array(
  307. 'location' => 'query',
  308. 'type' => 'string',
  309. ),
  310. ),
  311. ),'delete' => array(
  312. 'path' => 'liveBroadcasts',
  313. 'httpMethod' => 'DELETE',
  314. 'parameters' => array(
  315. 'id' => array(
  316. 'location' => 'query',
  317. 'type' => 'string',
  318. 'required' => true,
  319. ),
  320. 'onBehalfOfContentOwner' => array(
  321. 'location' => 'query',
  322. 'type' => 'string',
  323. ),
  324. ),
  325. ),'insert' => array(
  326. 'path' => 'liveBroadcasts',
  327. 'httpMethod' => 'POST',
  328. 'parameters' => array(
  329. 'part' => array(
  330. 'location' => 'query',
  331. 'type' => 'string',
  332. 'required' => true,
  333. ),
  334. 'onBehalfOfContentOwner' => array(
  335. 'location' => 'query',
  336. 'type' => 'string',
  337. ),
  338. ),
  339. ),'list' => array(
  340. 'path' => 'liveBroadcasts',
  341. 'httpMethod' => 'GET',
  342. 'parameters' => array(
  343. 'part' => array(
  344. 'location' => 'query',
  345. 'type' => 'string',
  346. 'required' => true,
  347. ),
  348. 'broadcastStatus' => array(
  349. 'location' => 'query',
  350. 'type' => 'string',
  351. ),
  352. 'mine' => array(
  353. 'location' => 'query',
  354. 'type' => 'boolean',
  355. ),
  356. 'maxResults' => array(
  357. 'location' => 'query',
  358. 'type' => 'integer',
  359. ),
  360. 'pageToken' => array(
  361. 'location' => 'query',
  362. 'type' => 'string',
  363. ),
  364. 'id' => array(
  365. 'location' => 'query',
  366. 'type' => 'string',
  367. ),
  368. ),
  369. ),'transition' => array(
  370. 'path' => 'liveBroadcasts/transition',
  371. 'httpMethod' => 'POST',
  372. 'parameters' => array(
  373. 'broadcastStatus' => array(
  374. 'location' => 'query',
  375. 'type' => 'string',
  376. 'required' => true,
  377. ),
  378. 'id' => array(
  379. 'location' => 'query',
  380. 'type' => 'string',
  381. 'required' => true,
  382. ),
  383. 'part' => array(
  384. 'location' => 'query',
  385. 'type' => 'string',
  386. 'required' => true,
  387. ),
  388. 'onBehalfOfContentOwner' => array(
  389. 'location' => 'query',
  390. 'type' => 'string',
  391. ),
  392. ),
  393. ),'update' => array(
  394. 'path' => 'liveBroadcasts',
  395. 'httpMethod' => 'PUT',
  396. 'parameters' => array(
  397. 'part' => array(
  398. 'location' => 'query',
  399. 'type' => 'string',
  400. 'required' => true,
  401. ),
  402. 'onBehalfOfContentOwner' => array(
  403. 'location' => 'query',
  404. 'type' => 'string',
  405. ),
  406. ),
  407. ),
  408. )
  409. )
  410. );
  411. $this->liveStreams = new Google_Service_YouTube_LiveStreams_Resource(
  412. $this,
  413. $this->serviceName,
  414. 'liveStreams',
  415. array(
  416. 'methods' => array(
  417. 'delete' => array(
  418. 'path' => 'liveStreams',
  419. 'httpMethod' => 'DELETE',
  420. 'parameters' => array(
  421. 'id' => array(
  422. 'location' => 'query',
  423. 'type' => 'string',
  424. 'required' => true,
  425. ),
  426. ),
  427. ),'insert' => array(
  428. 'path' => 'liveStreams',
  429. 'httpMethod' => 'POST',
  430. 'parameters' => array(
  431. 'part' => array(
  432. 'location' => 'query',
  433. 'type' => 'string',
  434. 'required' => true,
  435. ),
  436. ),
  437. ),'list' => array(
  438. 'path' => 'liveStreams',
  439. 'httpMethod' => 'GET',
  440. 'parameters' => array(
  441. 'part' => array(
  442. 'location' => 'query',
  443. 'type' => 'string',
  444. 'required' => true,
  445. ),
  446. 'pageToken' => array(
  447. 'location' => 'query',
  448. 'type' => 'string',
  449. ),
  450. 'id' => array(
  451. 'location' => 'query',
  452. 'type' => 'string',
  453. ),
  454. 'maxResults' => array(
  455. 'location' => 'query',
  456. 'type' => 'integer',
  457. ),
  458. 'mine' => array(
  459. 'location' => 'query',
  460. 'type' => 'boolean',
  461. ),
  462. ),
  463. ),'update' => array(
  464. 'path' => 'liveStreams',
  465. 'httpMethod' => 'PUT',
  466. 'parameters' => array(
  467. 'part' => array(
  468. 'location' => 'query',
  469. 'type' => 'string',
  470. 'required' => true,
  471. ),
  472. ),
  473. ),
  474. )
  475. )
  476. );
  477. $this->playlistItems = new Google_Service_YouTube_PlaylistItems_Resource(
  478. $this,
  479. $this->serviceName,
  480. 'playlistItems',
  481. array(
  482. 'methods' => array(
  483. 'delete' => array(
  484. 'path' => 'playlistItems',
  485. 'httpMethod' => 'DELETE',
  486. 'parameters' => array(
  487. 'id' => array(
  488. 'location' => 'query',
  489. 'type' => 'string',
  490. 'required' => true,
  491. ),
  492. ),
  493. ),'insert' => array(
  494. 'path' => 'playlistItems',
  495. 'httpMethod' => 'POST',
  496. 'parameters' => array(
  497. 'part' => array(
  498. 'location' => 'query',
  499. 'type' => 'string',
  500. 'required' => true,
  501. ),
  502. 'onBehalfOfContentOwner' => array(
  503. 'location' => 'query',
  504. 'type' => 'string',
  505. ),
  506. ),
  507. ),'list' => array(
  508. 'path' => 'playlistItems',
  509. 'httpMethod' => 'GET',
  510. 'parameters' => array(
  511. 'part' => array(
  512. 'location' => 'query',
  513. 'type' => 'string',
  514. 'required' => true,
  515. ),
  516. 'onBehalfOfContentOwner' => array(
  517. 'location' => 'query',
  518. 'type' => 'string',
  519. ),
  520. 'playlistId' => array(
  521. 'location' => 'query',
  522. 'type' => 'string',
  523. ),
  524. 'videoId' => array(
  525. 'location' => 'query',
  526. 'type' => 'string',
  527. ),
  528. 'maxResults' => array(
  529. 'location' => 'query',
  530. 'type' => 'integer',
  531. ),
  532. 'pageToken' => array(
  533. 'location' => 'query',
  534. 'type' => 'string',
  535. ),
  536. 'id' => array(
  537. 'location' => 'query',
  538. 'type' => 'string',
  539. ),
  540. ),
  541. ),'update' => array(
  542. 'path' => 'playlistItems',
  543. 'httpMethod' => 'PUT',
  544. 'parameters' => array(
  545. 'part' => array(
  546. 'location' => 'query',
  547. 'type' => 'string',
  548. 'required' => true,
  549. ),
  550. ),
  551. ),
  552. )
  553. )
  554. );
  555. $this->playlists = new Google_Service_YouTube_Playlists_Resource(
  556. $this,
  557. $this->serviceName,
  558. 'playlists',
  559. array(
  560. 'methods' => array(
  561. 'delete' => array(
  562. 'path' => 'playlists',
  563. 'httpMethod' => 'DELETE',
  564. 'parameters' => array(
  565. 'id' => array(
  566. 'location' => 'query',
  567. 'type' => 'string',
  568. 'required' => true,
  569. ),
  570. 'onBehalfOfContentOwner' => array(
  571. 'location' => 'query',
  572. 'type' => 'string',
  573. ),
  574. ),
  575. ),'insert' => array(
  576. 'path' => 'playlists',
  577. 'httpMethod' => 'POST',
  578. 'parameters' => array(
  579. 'part' => array(
  580. 'location' => 'query',
  581. 'type' => 'string',
  582. 'required' => true,
  583. ),
  584. 'onBehalfOfContentOwnerChannel' => array(
  585. 'location' => 'query',
  586. 'type' => 'string',
  587. ),
  588. 'onBehalfOfContentOwner' => array(
  589. 'location' => 'query',
  590. 'type' => 'string',
  591. ),
  592. ),
  593. ),'list' => array(
  594. 'path' => 'playlists',
  595. 'httpMethod' => 'GET',
  596. 'parameters' => array(
  597. 'part' => array(
  598. 'location' => 'query',
  599. 'type' => 'string',
  600. 'required' => true,
  601. ),
  602. 'onBehalfOfContentOwner' => array(
  603. 'location' => 'query',
  604. 'type' => 'string',
  605. ),
  606. 'onBehalfOfContentOwnerChannel' => array(
  607. 'location' => 'query',
  608. 'type' => 'string',
  609. ),
  610. 'channelId' => array(
  611. 'location' => 'query',
  612. 'type' => 'string',
  613. ),
  614. 'mine' => array(
  615. 'location' => 'query',
  616. 'type' => 'boolean',
  617. ),
  618. 'maxResults' => array(
  619. 'location' => 'query',
  620. 'type' => 'integer',
  621. ),
  622. 'pageToken' => array(
  623. 'location' => 'query',
  624. 'type' => 'string',
  625. ),
  626. 'id' => array(
  627. 'location' => 'query',
  628. 'type' => 'string',
  629. ),
  630. ),
  631. ),'update' => array(
  632. 'path' => 'playlists',
  633. 'httpMethod' => 'PUT',
  634. 'parameters' => array(
  635. 'part' => array(
  636. 'location' => 'query',
  637. 'type' => 'string',
  638. 'required' => true,
  639. ),
  640. 'onBehalfOfContentOwner' => array(
  641. 'location' => 'query',
  642. 'type' => 'string',
  643. ),
  644. ),
  645. ),
  646. )
  647. )
  648. );
  649. $this->search = new Google_Service_YouTube_Search_Resource(
  650. $this,
  651. $this->serviceName,
  652. 'search',
  653. array(
  654. 'methods' => array(
  655. 'list' => array(
  656. 'path' => 'search',
  657. 'httpMethod' => 'GET',
  658. 'parameters' => array(
  659. 'part' => array(
  660. 'location' => 'query',
  661. 'type' => 'string',
  662. 'required' => true,
  663. ),
  664. 'eventType' => array(
  665. 'location' => 'query',
  666. 'type' => 'string',
  667. ),
  668. 'channelId' => array(
  669. 'location' => 'query',
  670. 'type' => 'string',
  671. ),
  672. 'videoSyndicated' => array(
  673. 'location' => 'query',
  674. 'type' => 'string',
  675. ),
  676. 'channelType' => array(
  677. 'location' => 'query',
  678. 'type' => 'string',
  679. ),
  680. 'videoCaption' => array(
  681. 'location' => 'query',
  682. 'type' => 'string',
  683. ),
  684. 'publishedAfter' => array(
  685. 'location' => 'query',
  686. 'type' => 'string',
  687. ),
  688. 'onBehalfOfContentOwner' => array(
  689. 'location' => 'query',
  690. 'type' => 'string',
  691. ),
  692. 'pageToken' => array(
  693. 'location' => 'query',
  694. 'type' => 'string',
  695. ),
  696. 'forContentOwner' => array(
  697. 'location' => 'query',
  698. 'type' => 'boolean',
  699. ),
  700. 'regionCode' => array(
  701. 'location' => 'query',
  702. 'type' => 'string',
  703. ),
  704. 'videoType' => array(
  705. 'location' => 'query',
  706. 'type' => 'string',
  707. ),
  708. 'type' => array(
  709. 'location' => 'query',
  710. 'type' => 'string',
  711. ),
  712. 'topicId' => array(
  713. 'location' => 'query',
  714. 'type' => 'string',
  715. ),
  716. 'publishedBefore' => array(
  717. 'location' => 'query',
  718. 'type' => 'string',
  719. ),
  720. 'videoDimension' => array(
  721. 'location' => 'query',
  722. 'type' => 'string',
  723. ),
  724. 'videoLicense' => array(
  725. 'location' => 'query',
  726. 'type' => 'string',
  727. ),
  728. 'maxResults' => array(
  729. 'location' => 'query',
  730. 'type' => 'integer',
  731. ),
  732. 'relatedToVideoId' => array(
  733. 'location' => 'query',
  734. 'type' => 'string',
  735. ),
  736. 'videoDefinition' => array(
  737. 'location' => 'query',
  738. 'type' => 'string',
  739. ),
  740. 'videoDuration' => array(
  741. 'location' => 'query',
  742. 'type' => 'string',
  743. ),
  744. 'forMine' => array(
  745. 'location' => 'query',
  746. 'type' => 'boolean',
  747. ),
  748. 'q' => array(
  749. 'location' => 'query',
  750. 'type' => 'string',
  751. ),
  752. 'safeSearch' => array(
  753. 'location' => 'query',
  754. 'type' => 'string',
  755. ),
  756. 'videoEmbeddable' => array(
  757. 'location' => 'query',
  758. 'type' => 'string',
  759. ),
  760. 'videoCategoryId' => array(
  761. 'location' => 'query',
  762. 'type' => 'string',
  763. ),
  764. 'order' => array(
  765. 'location' => 'query',
  766. 'type' => 'string',
  767. ),
  768. ),
  769. ),
  770. )
  771. )
  772. );
  773. $this->subscriptions = new Google_Service_YouTube_Subscriptions_Resource(
  774. $this,
  775. $this->serviceName,
  776. 'subscriptions',
  777. array(
  778. 'methods' => array(
  779. 'delete' => array(
  780. 'path' => 'subscriptions',
  781. 'httpMethod' => 'DELETE',
  782. 'parameters' => array(
  783. 'id' => array(
  784. 'location' => 'query',
  785. 'type' => 'string',
  786. 'required' => true,
  787. ),
  788. ),
  789. ),'insert' => array(
  790. 'path' => 'subscriptions',
  791. 'httpMethod' => 'POST',
  792. 'parameters' => array(
  793. 'part' => array(
  794. 'location' => 'query',
  795. 'type' => 'string',
  796. 'required' => true,
  797. ),
  798. ),
  799. ),'list' => array(
  800. 'path' => 'subscriptions',
  801. 'httpMethod' => 'GET',
  802. 'parameters' => array(
  803. 'part' => array(
  804. 'location' => 'query',
  805. 'type' => 'string',
  806. 'required' => true,
  807. ),
  808. 'onBehalfOfContentOwner' => array(
  809. 'location' => 'query',
  810. 'type' => 'string',
  811. ),
  812. 'onBehalfOfContentOwnerChannel' => array(
  813. 'location' => 'query',
  814. 'type' => 'string',
  815. ),
  816. 'channelId' => array(
  817. 'location' => 'query',
  818. 'type' => 'string',
  819. ),
  820. 'mine' => array(
  821. 'location' => 'query',
  822. 'type' => 'boolean',
  823. ),
  824. 'maxResults' => array(
  825. 'location' => 'query',
  826. 'type' => 'integer',
  827. ),
  828. 'forChannelId' => array(
  829. 'location' => 'query',
  830. 'type' => 'string',
  831. ),
  832. 'pageToken' => array(
  833. 'location' => 'query',
  834. 'type' => 'string',
  835. ),
  836. 'mySubscribers' => array(
  837. 'location' => 'query',
  838. 'type' => 'boolean',
  839. ),
  840. 'order' => array(
  841. 'location' => 'query',
  842. 'type' => 'string',
  843. ),
  844. 'id' => array(
  845. 'location' => 'query',
  846. 'type' => 'string',
  847. ),
  848. ),
  849. ),
  850. )
  851. )
  852. );
  853. $this->thumbnails = new Google_Service_YouTube_Thumbnails_Resource(
  854. $this,
  855. $this->serviceName,
  856. 'thumbnails',
  857. array(
  858. 'methods' => array(
  859. 'set' => array(
  860. 'path' => 'thumbnails/set',
  861. 'httpMethod' => 'POST',
  862. 'parameters' => array(
  863. 'videoId' => array(
  864. 'location' => 'query',
  865. 'type' => 'string',
  866. 'required' => true,
  867. ),
  868. 'onBehalfOfContentOwner' => array(
  869. 'location' => 'query',
  870. 'type' => 'string',
  871. ),
  872. ),
  873. ),
  874. )
  875. )
  876. );
  877. $this->videoCategories = new Google_Service_YouTube_VideoCategories_Resource(
  878. $this,
  879. $this->serviceName,
  880. 'videoCategories',
  881. array(
  882. 'methods' => array(
  883. 'list' => array(
  884. 'path' => 'videoCategories',
  885. 'httpMethod' => 'GET',
  886. 'parameters' => array(
  887. 'part' => array(
  888. 'location' => 'query',
  889. 'type' => 'string',
  890. 'required' => true,
  891. ),
  892. 'regionCode' => array(
  893. 'location' => 'query',
  894. 'type' => 'string',
  895. ),
  896. 'id' => array(
  897. 'location' => 'query',
  898. 'type' => 'string',
  899. ),
  900. 'hl' => array(
  901. 'location' => 'query',
  902. 'type' => 'string',
  903. ),
  904. ),
  905. ),
  906. )
  907. )
  908. );
  909. $this->videos = new Google_Service_YouTube_Videos_Resource(
  910. $this,
  911. $this->serviceName,
  912. 'videos',
  913. array(
  914. 'methods' => array(
  915. 'delete' => array(
  916. 'path' => 'videos',
  917. 'httpMethod' => 'DELETE',
  918. 'parameters' => array(
  919. 'id' => array(
  920. 'location' => 'query',
  921. 'type' => 'string',
  922. 'required' => true,
  923. ),
  924. 'onBehalfOfContentOwner' => array(
  925. 'location' => 'query',
  926. 'type' => 'string',
  927. ),
  928. ),
  929. ),'getRating' => array(
  930. 'path' => 'videos/getRating',
  931. 'httpMethod' => 'GET',
  932. 'parameters' => array(
  933. 'id' => array(
  934. 'location' => 'query',
  935. 'type' => 'string',
  936. 'required' => true,
  937. ),
  938. 'onBehalfOfContentOwner' => array(
  939. 'location' => 'query',
  940. 'type' => 'string',
  941. ),
  942. ),
  943. ),'insert' => array(
  944. 'path' => 'videos',
  945. 'httpMethod' => 'POST',
  946. 'parameters' => array(
  947. 'part' => array(
  948. 'location' => 'query',
  949. 'type' => 'string',
  950. 'required' => true,
  951. ),
  952. 'onBehalfOfContentOwner' => array(
  953. 'location' => 'query',
  954. 'type' => 'string',
  955. ),
  956. 'stabilize' => array(
  957. 'location' => 'query',
  958. 'type' => 'boolean',
  959. ),
  960. 'onBehalfOfContentOwnerChannel' => array(
  961. 'location' => 'query',
  962. 'type' => 'string',
  963. ),
  964. 'notifySubscribers' => array(
  965. 'location' => 'query',
  966. 'type' => 'boolean',
  967. ),
  968. 'autoLevels' => array(
  969. 'location' => 'query',
  970. 'type' => 'boolean',
  971. ),
  972. ),
  973. ),'list' => array(
  974. 'path' => 'videos',
  975. 'httpMethod' => 'GET',
  976. 'parameters' => array(
  977. 'part' => array(
  978. 'location' => 'query',
  979. 'type' => 'string',
  980. 'required' => true,
  981. ),
  982. 'onBehalfOfContentOwner' => array(
  983. 'location' => 'query',
  984. 'type' => 'string',
  985. ),
  986. 'regionCode' => array(
  987. 'location' => 'query',
  988. 'type' => 'string',
  989. ),
  990. 'locale' => array(
  991. 'location' => 'query',
  992. 'type' => 'string',
  993. ),
  994. 'videoCategoryId' => array(
  995. 'location' => 'query',
  996. 'type' => 'string',
  997. ),
  998. 'chart' => array(
  999. 'location' => 'query',
  1000. 'type' => 'string',
  1001. ),
  1002. 'maxResults' => array(
  1003. 'location' => 'query',
  1004. 'type' => 'integer',
  1005. ),
  1006. 'pageToken' => array(
  1007. 'location' => 'query',
  1008. 'type' => 'string',
  1009. ),
  1010. 'myRating' => array(
  1011. 'location' => 'query',
  1012. 'type' => 'string',
  1013. ),
  1014. 'id' => array(
  1015. 'location' => 'query',
  1016. 'type' => 'string',
  1017. ),
  1018. ),
  1019. ),'rate' => array(
  1020. 'path' => 'videos/rate',
  1021. 'httpMethod' => 'POST',
  1022. 'parameters' => array(
  1023. 'id' => array(
  1024. 'location' => 'query',
  1025. 'type' => 'string',
  1026. 'required' => true,
  1027. ),
  1028. 'rating' => array(
  1029. 'location' => 'query',
  1030. 'type' => 'string',
  1031. 'required' => true,
  1032. ),
  1033. 'onBehalfOfContentOwner' => array(
  1034. 'location' => 'query',
  1035. 'type' => 'string',
  1036. ),
  1037. ),
  1038. ),'update' => array(
  1039. 'path' => 'videos',
  1040. 'httpMethod' => 'PUT',
  1041. 'parameters' => array(
  1042. 'part' => array(
  1043. 'location' => 'query',
  1044. 'type' => 'string',
  1045. 'required' => true,
  1046. ),
  1047. 'onBehalfOfContentOwner' => array(
  1048. 'location' => 'query',
  1049. 'type' => 'string',
  1050. ),
  1051. ),
  1052. ),
  1053. )
  1054. )
  1055. );
  1056. $this->watermarks = new Google_Service_YouTube_Watermarks_Resource(
  1057. $this,
  1058. $this->serviceName,
  1059. 'watermarks',
  1060. array(
  1061. 'methods' => array(
  1062. 'set' => array(
  1063. 'path' => 'watermarks/set',
  1064. 'httpMethod' => 'POST',
  1065. 'parameters' => array(
  1066. 'channelId' => array(
  1067. 'location' => 'query',
  1068. 'type' => 'string',
  1069. 'required' => true,
  1070. ),
  1071. 'onBehalfOfContentOwner' => array(
  1072. 'location' => 'query',
  1073. 'type' => 'string',
  1074. ),
  1075. ),
  1076. ),'unset' => array(
  1077. 'path' => 'watermarks/unset',
  1078. 'httpMethod' => 'POST',
  1079. 'parameters' => array(
  1080. 'channelId' => array(
  1081. 'location' => 'query',
  1082. 'type' => 'string',
  1083. 'required' => true,
  1084. ),
  1085. 'onBehalfOfContentOwner' => array(
  1086. 'location' => 'query',
  1087. 'type' => 'string',
  1088. ),
  1089. ),
  1090. ),
  1091. )
  1092. )
  1093. );
  1094. }
  1095. }
  1096. /**
  1097. * The "activities" collection of methods.
  1098. * Typical usage is:
  1099. * <code>
  1100. * $youtubeService = new Google_Service_YouTube(...);
  1101. * $activities = $youtubeService->activities;
  1102. * </code>
  1103. */
  1104. class Google_Service_YouTube_Activities_Resource extends Google_Service_Resource
  1105. {
  1106. /**
  1107. * Posts a bulletin for a specific channel. (The user submitting the request
  1108. * must be authorized to act on the channel's behalf.)
  1109. *
  1110. * Note: Even though an activity resource can contain information about actions
  1111. * like a user rating a video or marking a video as a favorite, you need to use
  1112. * other API methods to generate those activity resources. For example, you
  1113. * would use the API's videos.rate() method to rate a video and the
  1114. * playlistItems.insert() method to mark a video as a favorite.
  1115. * (activities.insert)
  1116. *
  1117. * @param string $part
  1118. * The part parameter serves two purposes in this operation. It identifies the properties that the
  1119. * write operation will set as well as the properties that the API response will include.
  1120. The part
  1121. * names that you can include in the parameter value are snippet and contentDetails.
  1122. * @param Google_Activity $postBody
  1123. * @param array $optParams Optional parameters.
  1124. * @return Google_Service_YouTube_Activity
  1125. */
  1126. public function insert($part, Google_Service_YouTube_Activity $postBody, $optParams = array())
  1127. {
  1128. $params = array('part' => $part, 'postBody' => $postBody);
  1129. $params = array_merge($params, $optParams);
  1130. return $this->call('insert', array($params), "Google_Service_YouTube_Activity");
  1131. }
  1132. /**
  1133. * Returns a list of channel activity events that match the request criteria.
  1134. * For example, you can retrieve events associated with a particular channel,
  1135. * events associated with the user's subscriptions and Google+ friends, or the
  1136. * YouTube home page feed, which is customized for each user.
  1137. * (activities.listActivities)
  1138. *
  1139. * @param string $part
  1140. * The part parameter specifies a comma-separated list of one or more activity resource properties
  1141. * that the API response will include. The part names that you can include in the parameter value
  1142. * are id, snippet, and contentDetails.
  1143. If the parameter identifies a property that contains child
  1144. * properties, the child properties will be included in the response. For example, in a activity
  1145. * resource, the snippet property contains other properties that identify the type of activity, a
  1146. * display title for the activity, and so forth. If you set part=snippet, the API response will
  1147. * also contain all of those nested properties.
  1148. * @param array $optParams Optional parameters.
  1149. *
  1150. * @opt_param string regionCode
  1151. * The regionCode parameter instructs the API to return results for the specified country. The
  1152. * parameter value is an ISO 3166-1 alpha-2 country code. YouTube uses this value when the
  1153. * authorized user's previous activity on YouTube does not provide enough information to generate
  1154. * the activity feed.
  1155. * @opt_param string publishedBefore
  1156. * The publishedBefore parameter specifies the date and time before which an activity must have
  1157. * occurred for that activity to be included in the API response. If the parameter value specifies
  1158. * a day, but not a time, then any activities that occurred that day will be excluded from the
  1159. * result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
  1160. * @opt_param string channelId
  1161. * The channelId parameter specifies a unique YouTube channel ID. The API will then return a list
  1162. * of that channel's activities.
  1163. * @opt_param bool mine
  1164. * Set this parameter's value to true to retrieve a feed of the authenticated user's activities.
  1165. * @opt_param string maxResults
  1166. * The maxResults parameter specifies the maximum number of items that should be returned in the
  1167. * result set.
  1168. * @opt_param string pageToken
  1169. * The pageToken parameter identifies a specific page in the result set that should be returned. In
  1170. * an API response, the nextPageToken and prevPageToken properties identify other pages that could
  1171. * be retrieved.
  1172. * @opt_param bool home
  1173. * Set this parameter's value to true to retrieve the activity feed that displays on the YouTube
  1174. * home page for the currently authenticated user.
  1175. * @opt_param string publishedAfter
  1176. * The publishedAfter parameter specifies the earliest date and time that an activity could have
  1177. * occurred for that activity to be included in the API response. If the parameter value specifies
  1178. * a day, but not a time, then any activities that occurred that day will be included in the result
  1179. * set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
  1180. * @return Google_Service_YouTube_ActivityListResponse
  1181. */
  1182. public function listActivities($part, $optParams = array())
  1183. {
  1184. $params = array('part' => $part);
  1185. $params = array_merge($params, $optParams);
  1186. return $this->call('list', array($params), "Google_Service_YouTube_ActivityListResponse");
  1187. }
  1188. }
  1189. /**
  1190. * The "channelBanners" collection of methods.
  1191. * Typical usage is:
  1192. * <code>
  1193. * $youtubeService = new Google_Service_YouTube(...);
  1194. * $channelBanners = $youtubeService->channelBanners;
  1195. * </code>
  1196. */
  1197. class Google_Service_YouTube_ChannelBanners_Resource extends Google_Service_Resource
  1198. {
  1199. /**
  1200. * Uploads a channel banner image to YouTube. This method represents the first
  1201. * two steps in a three-step process to update the banner image for a channel:
  1202. *
  1203. * - Call the channelBanners.insert method to upload the binary image data to
  1204. * YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192
  1205. * pixels. - Extract the url property's value from the response that the API
  1206. * returns for step 1. - Call the channels.update method to update the channel's
  1207. * branding settings. Set the brandingSettings.image.bannerExternalUrl
  1208. * property's value to the URL obtained in step 2. (channelBanners.insert)
  1209. *
  1210. * @param Google_ChannelBannerResource $postBody
  1211. * @param array $optParams Optional parameters.
  1212. *
  1213. * @opt_param string onBehalfOfContentOwner
  1214. * Note: This parameter is intended exclusively for YouTube content partners.
  1215. The
  1216. * onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify
  1217. * a YouTube CMS user who is acting on behalf of the content owner specified in the parameter
  1218. * value. This parameter is intended for YouTube content partners that own and manage many
  1219. * different YouTube channels. It allows content owners to authenticate once and get access to all
  1220. * their video and channel data, without having to provide authentication credentials for each
  1221. * individual channel. The CMS account that the user authenticates with must be linked to the
  1222. * specified YouTube content owner.
  1223. * @return Google_Service_YouTube_ChannelBannerResource
  1224. */
  1225. public function insert(Google_Service_YouTube_ChannelBannerResource $postBody, $optParams = array())
  1226. {
  1227. $params = array('postBody' => $postBody);
  1228. $params = array_merge($params, $optParams);
  1229. return $this->call('insert', array($params), "Google_Service_YouTube_ChannelBannerResource");
  1230. }
  1231. }
  1232. /**
  1233. * The "channels" collection of methods.
  1234. * Typical usage is:
  1235. * <code>
  1236. * $youtubeService = new Google_Service_YouTube(...);
  1237. * $channels = $youtubeService->channels;
  1238. * </code>
  1239. */
  1240. class Google_Service_YouTube_Channels_Resource extends Google_Service_Resource
  1241. {
  1242. /**
  1243. * Returns a collection of zero or more channel resources that match the request
  1244. * criteria. (channels.listChannels)
  1245. *
  1246. * @param string $part
  1247. * The part parameter specifies a comma-separated list of one or more channel resource properties
  1248. * that the API response will include. The part names that you can include in the parameter value
  1249. * are id, snippet, contentDetails, statistics, topicDetails, and invideoPromotion.
  1250. If the
  1251. * parameter identifies a property that contains child properties, the child properties will be
  1252. * included in the response. For example, in a channel resource, the contentDetails property
  1253. * contains other properties, such as the uploads properties. As such, if you set
  1254. * part=contentDetails, the API response will also contain all of those nested properties.
  1255. * @param array $optParams Optional parameters.
  1256. *
  1257. * @opt_param bool managedByMe
  1258. * Set this parameter's value to true to instruct the API to only return channels managed by the
  1259. * content owner that the onBehalfOfContentOwner parameter specifies. The user must be
  1260. * authenticated as a CMS account linked to the specified content owner and onBehalfOfContentOwner
  1261. * must be provided.
  1262. * @opt_param string onBehalfOfContentOwner
  1263. * The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf
  1264. * of the content owner specified in the parameter value. This parameter is intended for YouTube
  1265. * content partners that own and manage many different YouTube channels. It allows content owners
  1266. * to authenticate once and get access to all their video and channel data, without having to
  1267. * provide authentication credentials for each individual channel. The actual CMS account that the
  1268. * user authenticates with needs to be linked to the specified YouTube content owner.
  1269. * @opt_param string forUsername
  1270. * The forUsername parameter specifies a YouTube username, thereby requesting the channel
  1271. * associated with that username.
  1272. * @opt_param bool mine
  1273. * Set this parameter's value to true to instruct the API to only return channels owned by the
  1274. * authenticated user.
  1275. * @opt_param string maxResults
  1276. * The maxResults parameter specifies the maximum number of items that should be returned in the
  1277. * result set.
  1278. * @opt_param string id
  1279. * The id parameter specifies a comma-separated list of the YouTube channel ID(s) for the
  1280. * resource(s) that are being retrieved. In a channel resource, the id property specifies the
  1281. * channel's YouTube channel ID.
  1282. * @opt_param string pageToken
  1283. * The pageToken parameter identifies a specific page in the result set that should be returned. In
  1284. * an API response, the nextPageToken and prevPageToken properties identify other pages that could
  1285. * be retrieved.
  1286. * @opt_param bool mySubscribers
  1287. * Set this parameter's value to true to retrieve a list of channels that subscribed to the
  1288. * authenticated user's channel.
  1289. * @opt_param string categoryId
  1290. * The categoryId parameter specifies a YouTube guide category, thereby requesting YouTube channels
  1291. * associated with that category.
  1292. * @return Google_Service_YouTube_ChannelListResponse
  1293. */
  1294. public function listChannels($part, $optParams = array())
  1295. {
  1296. $params = array('part' => $part);
  1297. $params = array_merge($params, $optParams);
  1298. return $this->call('list', array($params), "Google_Service_YouTube_ChannelListResponse");
  1299. }
  1300. /**
  1301. * Updates a channel's metadata. (channels.update)
  1302. *
  1303. * @param string $part
  1304. * The part parameter serves two purposes in this operation. It identifies the properties that the
  1305. * write operation will set as well as the properties that the API response will include.
  1306. The part
  1307. * names that you can include in the parameter value are id and invideoPromotion.
  1308. Note that this
  1309. * method will override the existing values for all of the mutable properties that are contained in
  1310. * any parts that the parameter value specifies.
  1311. * @param Google_Channel $postBody
  1312. * @param array $optParams Optional parameters.
  1313. *
  1314. * @opt_param string onBehalfOfContentOwner
  1315. * The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf
  1316. * of the content owner specified in the parameter value. This parameter is intended for YouTube
  1317. * content partners that own and manage many different YouTube channels. It allows content owners
  1318. * to authenticate once and get access to all their video and channel data, without having to
  1319. * provide authentication credentials for each individual channel. The actual CMS account that the
  1320. * user authenticates with needs to be linked to the specified YouTube content owner.
  1321. * @return Google_Service_YouTube_Channel
  1322. */
  1323. public function update($part, Google_Service_YouTube_Channel $postBody, $optParams = array())
  1324. {
  1325. $params = array('part' => $part, 'postBody' => $postBody);
  1326. $params = array_merge($params, $optParams);
  1327. return $this->call('update', array($params), "Google_Service_YouTube_Channel");
  1328. }
  1329. }
  1330. /**
  1331. * The "guideCategories" collection of methods.
  1332. * Typical usage is:
  1333. * <code>
  1334. * $youtubeService = new Google_Service_YouTube(...);
  1335. * $guideCategories = $youtubeService->guideCategories;
  1336. * </code>
  1337. */
  1338. class Google_Service_YouTube_GuideCategories_Resource extends Google_Service_Resource
  1339. {
  1340. /**
  1341. * Returns a list of categories that can be associated with YouTube channels.
  1342. * (guideCategories.listGuideCategories)
  1343. *
  1344. * @param string $part
  1345. * The part parameter specifies a comma-separated list of one or more guideCategory resource
  1346. * properties that the API response will include. The part names that you can include in the
  1347. * parameter value are id and snippet.
  1348. If the parameter identifies a property that contains child
  1349. * properties, the child properties will be included in the response. For example, in a
  1350. * guideCategory resource, the snippet property contains other properties, such as the category's
  1351. * title. If you set part=snippet, the API response will also contain all of those nested
  1352. * properties.
  1353. * @param array $optParams Optional parameters.
  1354. *
  1355. * @opt_param string regionCode
  1356. * The regionCode parameter instructs the API to return the list of guide categories available in
  1357. * the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
  1358. * @opt_param string id
  1359. * The id parameter specifies a comma-separated list of the YouTube channel category ID(s) for the
  1360. * resource(s) that are being retrieved. In a guideCategory resource, the id property specifies the
  1361. * You…

Large files files are truncated, but you can click here to view the full file