google-api-client 0.8.7 → 0.9.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,4051 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module YoutubeV3
23
+ # YouTube Data API
24
+ #
25
+ # Programmatic access to YouTube features.
26
+ #
27
+ # @example
28
+ # require 'google/apis/youtube_v3'
29
+ #
30
+ # Youtube = Google::Apis::YoutubeV3 # Alias the module
31
+ # service = Youtube::YouTubeService.new
32
+ #
33
+ # @see https://developers.google.com/youtube/v3
34
+ class YouTubeService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'youtube/v3/')
53
+ end
54
+
55
+ # Posts a bulletin for a specific channel. (The user submitting the request must
56
+ # be authorized to act on the channel's behalf.)
57
+ # Note: Even though an activity resource can contain information about actions
58
+ # like a user rating a video or marking a video as a favorite, you need to use
59
+ # other API methods to generate those activity resources. For example, you would
60
+ # use the API's videos.rate() method to rate a video and the playlistItems.
61
+ # insert() method to mark a video as a favorite.
62
+ # @param [Google::Apis::YoutubeV3::Activity] activity_object
63
+ # @param [String] part
64
+ # The part parameter serves two purposes in this operation. It identifies the
65
+ # properties that the write operation will set as well as the properties that
66
+ # the API response will include.
67
+ # @param [String] fields
68
+ # Selector specifying which fields to include in a partial response.
69
+ # @param [String] quota_user
70
+ # Available to use for quota purposes for server-side applications. Can be any
71
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
72
+ # Overrides userIp if both are provided.
73
+ # @param [String] user_ip
74
+ # IP address of the site where the request originates. Use this if you want to
75
+ # enforce per-user limits.
76
+ # @param [Google::Apis::RequestOptions] options
77
+ # Request-specific options
78
+ #
79
+ # @yield [result, err] Result & error if block supplied
80
+ # @yieldparam result [Google::Apis::YoutubeV3::Activity] parsed result object
81
+ # @yieldparam err [StandardError] error object if request failed
82
+ #
83
+ # @return [Google::Apis::YoutubeV3::Activity]
84
+ #
85
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
86
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
87
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
88
+ def insert_activity(activity_object = nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
89
+ path = 'activities'
90
+ command = make_simple_command(:post, path, options)
91
+ command.request_representation = Google::Apis::YoutubeV3::Activity::Representation
92
+ command.request_object = activity_object
93
+ command.response_representation = Google::Apis::YoutubeV3::Activity::Representation
94
+ command.response_class = Google::Apis::YoutubeV3::Activity
95
+ command.query['part'] = part unless part.nil?
96
+ command.query['fields'] = fields unless fields.nil?
97
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
98
+ command.query['userIp'] = user_ip unless user_ip.nil?
99
+ execute_or_queue_command(command, &block)
100
+ end
101
+
102
+ # Returns a list of channel activity events that match the request criteria. For
103
+ # example, you can retrieve events associated with a particular channel, events
104
+ # associated with the user's subscriptions and Google+ friends, or the YouTube
105
+ # home page feed, which is customized for each user.
106
+ # @param [String] channel_id
107
+ # The channelId parameter specifies a unique YouTube channel ID. The API will
108
+ # then return a list of that channel's activities.
109
+ # @param [Boolean] home
110
+ # Set this parameter's value to true to retrieve the activity feed that displays
111
+ # on the YouTube home page for the currently authenticated user.
112
+ # @param [Fixnum] max_results
113
+ # The maxResults parameter specifies the maximum number of items that should be
114
+ # returned in the result set.
115
+ # @param [Boolean] mine
116
+ # Set this parameter's value to true to retrieve a feed of the authenticated
117
+ # user's activities.
118
+ # @param [String] page_token
119
+ # The pageToken parameter identifies a specific page in the result set that
120
+ # should be returned. In an API response, the nextPageToken and prevPageToken
121
+ # properties identify other pages that could be retrieved.
122
+ # @param [String] part
123
+ # The part parameter specifies a comma-separated list of one or more activity
124
+ # resource properties that the API response will include.
125
+ # If the parameter identifies a property that contains child properties, the
126
+ # child properties will be included in the response. For example, in an activity
127
+ # resource, the snippet property contains other properties that identify the
128
+ # type of activity, a display title for the activity, and so forth. If you set
129
+ # part=snippet, the API response will also contain all of those nested
130
+ # properties.
131
+ # @param [DateTime] published_after
132
+ # The publishedAfter parameter specifies the earliest date and time that an
133
+ # activity could have occurred for that activity to be included in the API
134
+ # response. If the parameter value specifies a day, but not a time, then any
135
+ # activities that occurred that day will be included in the result set. The
136
+ # value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
137
+ # @param [DateTime] published_before
138
+ # The publishedBefore parameter specifies the date and time before which an
139
+ # activity must have occurred for that activity to be included in the API
140
+ # response. If the parameter value specifies a day, but not a time, then any
141
+ # activities that occurred that day will be excluded from the result set. The
142
+ # value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
143
+ # @param [String] region_code
144
+ # The regionCode parameter instructs the API to return results for the specified
145
+ # country. The parameter value is an ISO 3166-1 alpha-2 country code. YouTube
146
+ # uses this value when the authorized user's previous activity on YouTube does
147
+ # not provide enough information to generate the activity feed.
148
+ # @param [String] fields
149
+ # Selector specifying which fields to include in a partial response.
150
+ # @param [String] quota_user
151
+ # Available to use for quota purposes for server-side applications. Can be any
152
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
153
+ # Overrides userIp if both are provided.
154
+ # @param [String] user_ip
155
+ # IP address of the site where the request originates. Use this if you want to
156
+ # enforce per-user limits.
157
+ # @param [Google::Apis::RequestOptions] options
158
+ # Request-specific options
159
+ #
160
+ # @yield [result, err] Result & error if block supplied
161
+ # @yieldparam result [Google::Apis::YoutubeV3::ListActivitiesResponse] parsed result object
162
+ # @yieldparam err [StandardError] error object if request failed
163
+ #
164
+ # @return [Google::Apis::YoutubeV3::ListActivitiesResponse]
165
+ #
166
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
167
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
168
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
169
+ def list_activities(channel_id: nil, home: nil, max_results: nil, mine: nil, page_token: nil, part: nil, published_after: nil, published_before: nil, region_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
170
+ path = 'activities'
171
+ command = make_simple_command(:get, path, options)
172
+ command.response_representation = Google::Apis::YoutubeV3::ListActivitiesResponse::Representation
173
+ command.response_class = Google::Apis::YoutubeV3::ListActivitiesResponse
174
+ command.query['channelId'] = channel_id unless channel_id.nil?
175
+ command.query['home'] = home unless home.nil?
176
+ command.query['maxResults'] = max_results unless max_results.nil?
177
+ command.query['mine'] = mine unless mine.nil?
178
+ command.query['pageToken'] = page_token unless page_token.nil?
179
+ command.query['part'] = part unless part.nil?
180
+ command.query['publishedAfter'] = published_after unless published_after.nil?
181
+ command.query['publishedBefore'] = published_before unless published_before.nil?
182
+ command.query['regionCode'] = region_code unless region_code.nil?
183
+ command.query['fields'] = fields unless fields.nil?
184
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
185
+ command.query['userIp'] = user_ip unless user_ip.nil?
186
+ execute_or_queue_command(command, &block)
187
+ end
188
+
189
+ # Deletes a specified caption track.
190
+ # @param [String] debug_project_id_override
191
+ # The debugProjectIdOverride parameter should be used for mimicking a request
192
+ # for a certain project ID
193
+ # @param [String] id
194
+ # The id parameter identifies the caption track that is being deleted. The value
195
+ # is a caption track ID as identified by the id property in a caption resource.
196
+ # @param [String] on_behalf_of
197
+ # ID of the Google+ Page for the channel that the request is be on behalf of
198
+ # @param [String] on_behalf_of_content_owner
199
+ # Note: This parameter is intended exclusively for YouTube content partners.
200
+ # The onBehalfOfContentOwner parameter indicates that the request's
201
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
202
+ # of the content owner specified in the parameter value. This parameter is
203
+ # intended for YouTube content partners that own and manage many different
204
+ # YouTube channels. It allows content owners to authenticate once and get access
205
+ # to all their video and channel data, without having to provide authentication
206
+ # credentials for each individual channel. The actual CMS account that the user
207
+ # authenticates with must be linked to the specified YouTube content owner.
208
+ # @param [String] fields
209
+ # Selector specifying which fields to include in a partial response.
210
+ # @param [String] quota_user
211
+ # Available to use for quota purposes for server-side applications. Can be any
212
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
213
+ # Overrides userIp if both are provided.
214
+ # @param [String] user_ip
215
+ # IP address of the site where the request originates. Use this if you want to
216
+ # enforce per-user limits.
217
+ # @param [Google::Apis::RequestOptions] options
218
+ # Request-specific options
219
+ #
220
+ # @yield [result, err] Result & error if block supplied
221
+ # @yieldparam result [NilClass] No result returned for this method
222
+ # @yieldparam err [StandardError] error object if request failed
223
+ #
224
+ # @return [void]
225
+ #
226
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
227
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
228
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
229
+ def delete_caption(debug_project_id_override: nil, id: nil, on_behalf_of: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
230
+ path = 'captions'
231
+ command = make_simple_command(:delete, path, options)
232
+ command.query['debugProjectIdOverride'] = debug_project_id_override unless debug_project_id_override.nil?
233
+ command.query['id'] = id unless id.nil?
234
+ command.query['onBehalfOf'] = on_behalf_of unless on_behalf_of.nil?
235
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
236
+ command.query['fields'] = fields unless fields.nil?
237
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
238
+ command.query['userIp'] = user_ip unless user_ip.nil?
239
+ execute_or_queue_command(command, &block)
240
+ end
241
+
242
+ # Downloads a caption track. The caption track is returned in its original
243
+ # format unless the request specifies a value for the tfmt parameter and in its
244
+ # original language unless the request specifies a value for the tlang parameter.
245
+ # @param [String] id
246
+ # The id parameter identifies the caption track that is being retrieved. The
247
+ # value is a caption track ID as identified by the id property in a caption
248
+ # resource.
249
+ # @param [String] debug_project_id_override
250
+ # The debugProjectIdOverride parameter should be used for mimicking a request
251
+ # for a certain project ID
252
+ # @param [String] on_behalf_of
253
+ # ID of the Google+ Page for the channel that the request is be on behalf of
254
+ # @param [String] on_behalf_of_content_owner
255
+ # Note: This parameter is intended exclusively for YouTube content partners.
256
+ # The onBehalfOfContentOwner parameter indicates that the request's
257
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
258
+ # of the content owner specified in the parameter value. This parameter is
259
+ # intended for YouTube content partners that own and manage many different
260
+ # YouTube channels. It allows content owners to authenticate once and get access
261
+ # to all their video and channel data, without having to provide authentication
262
+ # credentials for each individual channel. The actual CMS account that the user
263
+ # authenticates with must be linked to the specified YouTube content owner.
264
+ # @param [String] tfmt
265
+ # The tfmt parameter specifies that the caption track should be returned in a
266
+ # specific format. If the parameter is not included in the request, the track is
267
+ # returned in its original format.
268
+ # @param [String] tlang
269
+ # The tlang parameter specifies that the API response should return a
270
+ # translation of the specified caption track. The parameter value is an ISO 639-
271
+ # 1 two-letter language code that identifies the desired caption language. The
272
+ # translation is generated by using machine translation, such as Google
273
+ # Translate.
274
+ # @param [String] fields
275
+ # Selector specifying which fields to include in a partial response.
276
+ # @param [String] quota_user
277
+ # Available to use for quota purposes for server-side applications. Can be any
278
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
279
+ # Overrides userIp if both are provided.
280
+ # @param [String] user_ip
281
+ # IP address of the site where the request originates. Use this if you want to
282
+ # enforce per-user limits.
283
+ # @param [IO, String] download_dest
284
+ # IO stream or filename to receive content download
285
+ # @param [Google::Apis::RequestOptions] options
286
+ # Request-specific options
287
+ #
288
+ # @yield [result, err] Result & error if block supplied
289
+ # @yieldparam result [NilClass] No result returned for this method
290
+ # @yieldparam err [StandardError] error object if request failed
291
+ #
292
+ # @return [void]
293
+ #
294
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
295
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
296
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
297
+ def download_caption(id, debug_project_id_override: nil, on_behalf_of: nil, on_behalf_of_content_owner: nil, tfmt: nil, tlang: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
298
+ path = 'captions/{id}'
299
+ if download_dest.nil?
300
+ command = make_simple_command(:get, path, options)
301
+ else
302
+ command = make_download_command(:get, path, options)
303
+ command.download_dest = download_dest
304
+ end
305
+ command.params['id'] = id unless id.nil?
306
+ command.query['debugProjectIdOverride'] = debug_project_id_override unless debug_project_id_override.nil?
307
+ command.query['onBehalfOf'] = on_behalf_of unless on_behalf_of.nil?
308
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
309
+ command.query['tfmt'] = tfmt unless tfmt.nil?
310
+ command.query['tlang'] = tlang unless tlang.nil?
311
+ command.query['fields'] = fields unless fields.nil?
312
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
313
+ command.query['userIp'] = user_ip unless user_ip.nil?
314
+ execute_or_queue_command(command, &block)
315
+ end
316
+
317
+ # Uploads a caption track.
318
+ # @param [Google::Apis::YoutubeV3::Caption] caption_object
319
+ # @param [String] debug_project_id_override
320
+ # The debugProjectIdOverride parameter should be used for mimicking a request
321
+ # for a certain project ID.
322
+ # @param [String] on_behalf_of
323
+ # ID of the Google+ Page for the channel that the request is be on behalf of
324
+ # @param [String] on_behalf_of_content_owner
325
+ # Note: This parameter is intended exclusively for YouTube content partners.
326
+ # The onBehalfOfContentOwner parameter indicates that the request's
327
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
328
+ # of the content owner specified in the parameter value. This parameter is
329
+ # intended for YouTube content partners that own and manage many different
330
+ # YouTube channels. It allows content owners to authenticate once and get access
331
+ # to all their video and channel data, without having to provide authentication
332
+ # credentials for each individual channel. The actual CMS account that the user
333
+ # authenticates with must be linked to the specified YouTube content owner.
334
+ # @param [String] part
335
+ # The part parameter specifies the caption resource parts that the API response
336
+ # will include. Set the parameter value to snippet.
337
+ # @param [Boolean] sync
338
+ # The sync parameter indicates whether YouTube should automatically synchronize
339
+ # the caption file with the audio track of the video. If you set the value to
340
+ # true, YouTube will disregard any time codes that are in the uploaded caption
341
+ # file and generate new time codes for the captions.
342
+ # You should set the sync parameter to true if you are uploading a transcript,
343
+ # which has no time codes, or if you suspect the time codes in your file are
344
+ # incorrect and want YouTube to try to fix them.
345
+ # @param [String] fields
346
+ # Selector specifying which fields to include in a partial response.
347
+ # @param [String] quota_user
348
+ # Available to use for quota purposes for server-side applications. Can be any
349
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
350
+ # Overrides userIp if both are provided.
351
+ # @param [String] user_ip
352
+ # IP address of the site where the request originates. Use this if you want to
353
+ # enforce per-user limits.
354
+ # @param [IO, String] upload_source
355
+ # IO stream or filename containing content to upload
356
+ # @param [String] content_type
357
+ # Content type of the uploaded content.
358
+ # @param [Google::Apis::RequestOptions] options
359
+ # Request-specific options
360
+ #
361
+ # @yield [result, err] Result & error if block supplied
362
+ # @yieldparam result [Google::Apis::YoutubeV3::Caption] parsed result object
363
+ # @yieldparam err [StandardError] error object if request failed
364
+ #
365
+ # @return [Google::Apis::YoutubeV3::Caption]
366
+ #
367
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
368
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
369
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
370
+ def insert_caption(caption_object = nil, debug_project_id_override: nil, on_behalf_of: nil, on_behalf_of_content_owner: nil, part: nil, sync: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
371
+ path = 'captions'
372
+ if upload_source.nil?
373
+ command = make_simple_command(:post, path, options)
374
+ else
375
+ command = make_upload_command(:post, path, options)
376
+ command.upload_source = upload_source
377
+ command.upload_content_type = content_type
378
+ end
379
+ command.request_representation = Google::Apis::YoutubeV3::Caption::Representation
380
+ command.request_object = caption_object
381
+ command.response_representation = Google::Apis::YoutubeV3::Caption::Representation
382
+ command.response_class = Google::Apis::YoutubeV3::Caption
383
+ command.query['debugProjectIdOverride'] = debug_project_id_override unless debug_project_id_override.nil?
384
+ command.query['onBehalfOf'] = on_behalf_of unless on_behalf_of.nil?
385
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
386
+ command.query['part'] = part unless part.nil?
387
+ command.query['sync'] = sync unless sync.nil?
388
+ command.query['fields'] = fields unless fields.nil?
389
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
390
+ command.query['userIp'] = user_ip unless user_ip.nil?
391
+ execute_or_queue_command(command, &block)
392
+ end
393
+
394
+ # Returns a list of caption tracks that are associated with a specified video.
395
+ # Note that the API response does not contain the actual captions and that the
396
+ # captions.download method provides the ability to retrieve a caption track.
397
+ # @param [String] debug_project_id_override
398
+ # The debugProjectIdOverride parameter should be used for mimicking a request
399
+ # for a certain project ID.
400
+ # @param [String] id
401
+ # The id parameter specifies a comma-separated list of IDs that identify the
402
+ # caption resources that should be retrieved. Each ID must identify a caption
403
+ # track associated with the specified video.
404
+ # @param [String] on_behalf_of
405
+ # ID of the Google+ Page for the channel that the request is on behalf of.
406
+ # @param [String] on_behalf_of_content_owner
407
+ # Note: This parameter is intended exclusively for YouTube content partners.
408
+ # The onBehalfOfContentOwner parameter indicates that the request's
409
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
410
+ # of the content owner specified in the parameter value. This parameter is
411
+ # intended for YouTube content partners that own and manage many different
412
+ # YouTube channels. It allows content owners to authenticate once and get access
413
+ # to all their video and channel data, without having to provide authentication
414
+ # credentials for each individual channel. The actual CMS account that the user
415
+ # authenticates with must be linked to the specified YouTube content owner.
416
+ # @param [String] part
417
+ # The part parameter specifies a comma-separated list of one or more caption
418
+ # resource parts that the API response will include. The part names that you can
419
+ # include in the parameter value are id and snippet.
420
+ # @param [String] video_id
421
+ # The videoId parameter specifies the YouTube video ID of the video for which
422
+ # the API should return caption tracks.
423
+ # @param [String] fields
424
+ # Selector specifying which fields to include in a partial response.
425
+ # @param [String] quota_user
426
+ # Available to use for quota purposes for server-side applications. Can be any
427
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
428
+ # Overrides userIp if both are provided.
429
+ # @param [String] user_ip
430
+ # IP address of the site where the request originates. Use this if you want to
431
+ # enforce per-user limits.
432
+ # @param [Google::Apis::RequestOptions] options
433
+ # Request-specific options
434
+ #
435
+ # @yield [result, err] Result & error if block supplied
436
+ # @yieldparam result [Google::Apis::YoutubeV3::ListCaptionsResponse] parsed result object
437
+ # @yieldparam err [StandardError] error object if request failed
438
+ #
439
+ # @return [Google::Apis::YoutubeV3::ListCaptionsResponse]
440
+ #
441
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
442
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
443
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
444
+ def list_captions(debug_project_id_override: nil, id: nil, on_behalf_of: nil, on_behalf_of_content_owner: nil, part: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
445
+ path = 'captions'
446
+ command = make_simple_command(:get, path, options)
447
+ command.response_representation = Google::Apis::YoutubeV3::ListCaptionsResponse::Representation
448
+ command.response_class = Google::Apis::YoutubeV3::ListCaptionsResponse
449
+ command.query['debugProjectIdOverride'] = debug_project_id_override unless debug_project_id_override.nil?
450
+ command.query['id'] = id unless id.nil?
451
+ command.query['onBehalfOf'] = on_behalf_of unless on_behalf_of.nil?
452
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
453
+ command.query['part'] = part unless part.nil?
454
+ command.query['videoId'] = video_id unless video_id.nil?
455
+ command.query['fields'] = fields unless fields.nil?
456
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
457
+ command.query['userIp'] = user_ip unless user_ip.nil?
458
+ execute_or_queue_command(command, &block)
459
+ end
460
+
461
+ # Updates a caption track. When updating a caption track, you can change the
462
+ # track's draft status, upload a new caption file for the track, or both.
463
+ # @param [Google::Apis::YoutubeV3::Caption] caption_object
464
+ # @param [String] debug_project_id_override
465
+ # The debugProjectIdOverride parameter should be used for mimicking a request
466
+ # for a certain project ID.
467
+ # @param [String] on_behalf_of
468
+ # ID of the Google+ Page for the channel that the request is be on behalf of
469
+ # @param [String] on_behalf_of_content_owner
470
+ # Note: This parameter is intended exclusively for YouTube content partners.
471
+ # The onBehalfOfContentOwner parameter indicates that the request's
472
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
473
+ # of the content owner specified in the parameter value. This parameter is
474
+ # intended for YouTube content partners that own and manage many different
475
+ # YouTube channels. It allows content owners to authenticate once and get access
476
+ # to all their video and channel data, without having to provide authentication
477
+ # credentials for each individual channel. The actual CMS account that the user
478
+ # authenticates with must be linked to the specified YouTube content owner.
479
+ # @param [String] part
480
+ # The part parameter serves two purposes in this operation. It identifies the
481
+ # properties that the write operation will set as well as the properties that
482
+ # the API response will include. Set the property value to snippet if you are
483
+ # updating the track's draft status. Otherwise, set the property value to id.
484
+ # @param [Boolean] sync
485
+ # Note: The API server only processes the parameter value if the request
486
+ # contains an updated caption file.
487
+ # The sync parameter indicates whether YouTube should automatically synchronize
488
+ # the caption file with the audio track of the video. If you set the value to
489
+ # true, YouTube will automatically synchronize the caption track with the audio
490
+ # track.
491
+ # @param [String] fields
492
+ # Selector specifying which fields to include in a partial response.
493
+ # @param [String] quota_user
494
+ # Available to use for quota purposes for server-side applications. Can be any
495
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
496
+ # Overrides userIp if both are provided.
497
+ # @param [String] user_ip
498
+ # IP address of the site where the request originates. Use this if you want to
499
+ # enforce per-user limits.
500
+ # @param [IO, String] upload_source
501
+ # IO stream or filename containing content to upload
502
+ # @param [String] content_type
503
+ # Content type of the uploaded content.
504
+ # @param [Google::Apis::RequestOptions] options
505
+ # Request-specific options
506
+ #
507
+ # @yield [result, err] Result & error if block supplied
508
+ # @yieldparam result [Google::Apis::YoutubeV3::Caption] parsed result object
509
+ # @yieldparam err [StandardError] error object if request failed
510
+ #
511
+ # @return [Google::Apis::YoutubeV3::Caption]
512
+ #
513
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
514
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
515
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
516
+ def update_caption(caption_object = nil, debug_project_id_override: nil, on_behalf_of: nil, on_behalf_of_content_owner: nil, part: nil, sync: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
517
+ path = 'captions'
518
+ if upload_source.nil?
519
+ command = make_simple_command(:put, path, options)
520
+ else
521
+ command = make_upload_command(:put, path, options)
522
+ command.upload_source = upload_source
523
+ command.upload_content_type = content_type
524
+ end
525
+ command.request_representation = Google::Apis::YoutubeV3::Caption::Representation
526
+ command.request_object = caption_object
527
+ command.response_representation = Google::Apis::YoutubeV3::Caption::Representation
528
+ command.response_class = Google::Apis::YoutubeV3::Caption
529
+ command.query['debugProjectIdOverride'] = debug_project_id_override unless debug_project_id_override.nil?
530
+ command.query['onBehalfOf'] = on_behalf_of unless on_behalf_of.nil?
531
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
532
+ command.query['part'] = part unless part.nil?
533
+ command.query['sync'] = sync unless sync.nil?
534
+ command.query['fields'] = fields unless fields.nil?
535
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
536
+ command.query['userIp'] = user_ip unless user_ip.nil?
537
+ execute_or_queue_command(command, &block)
538
+ end
539
+
540
+ # Uploads a channel banner image to YouTube. This method represents the first
541
+ # two steps in a three-step process to update the banner image for a channel:
542
+ # - Call the channelBanners.insert method to upload the binary image data to
543
+ # YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192
544
+ # pixels.
545
+ # - Extract the url property's value from the response that the API returns for
546
+ # step 1.
547
+ # - Call the channels.update method to update the channel's branding settings.
548
+ # Set the brandingSettings.image.bannerExternalUrl property's value to the URL
549
+ # obtained in step 2.
550
+ # @param [Google::Apis::YoutubeV3::ChannelBannerResource] channel_banner_resource_object
551
+ # @param [String] on_behalf_of_content_owner
552
+ # Note: This parameter is intended exclusively for YouTube content partners.
553
+ # The onBehalfOfContentOwner parameter indicates that the request's
554
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
555
+ # of the content owner specified in the parameter value. This parameter is
556
+ # intended for YouTube content partners that own and manage many different
557
+ # YouTube channels. It allows content owners to authenticate once and get access
558
+ # to all their video and channel data, without having to provide authentication
559
+ # credentials for each individual channel. The CMS account that the user
560
+ # authenticates with must be linked to the specified YouTube content owner.
561
+ # @param [String] fields
562
+ # Selector specifying which fields to include in a partial response.
563
+ # @param [String] quota_user
564
+ # Available to use for quota purposes for server-side applications. Can be any
565
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
566
+ # Overrides userIp if both are provided.
567
+ # @param [String] user_ip
568
+ # IP address of the site where the request originates. Use this if you want to
569
+ # enforce per-user limits.
570
+ # @param [IO, String] upload_source
571
+ # IO stream or filename containing content to upload
572
+ # @param [String] content_type
573
+ # Content type of the uploaded content.
574
+ # @param [Google::Apis::RequestOptions] options
575
+ # Request-specific options
576
+ #
577
+ # @yield [result, err] Result & error if block supplied
578
+ # @yieldparam result [Google::Apis::YoutubeV3::ChannelBannerResource] parsed result object
579
+ # @yieldparam err [StandardError] error object if request failed
580
+ #
581
+ # @return [Google::Apis::YoutubeV3::ChannelBannerResource]
582
+ #
583
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
584
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
585
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
586
+ def insert_channel_banner(channel_banner_resource_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
587
+ path = 'channelBanners/insert'
588
+ if upload_source.nil?
589
+ command = make_simple_command(:post, path, options)
590
+ else
591
+ command = make_upload_command(:post, path, options)
592
+ command.upload_source = upload_source
593
+ command.upload_content_type = content_type
594
+ end
595
+ command.request_representation = Google::Apis::YoutubeV3::ChannelBannerResource::Representation
596
+ command.request_object = channel_banner_resource_object
597
+ command.response_representation = Google::Apis::YoutubeV3::ChannelBannerResource::Representation
598
+ command.response_class = Google::Apis::YoutubeV3::ChannelBannerResource
599
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
600
+ command.query['fields'] = fields unless fields.nil?
601
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
602
+ command.query['userIp'] = user_ip unless user_ip.nil?
603
+ execute_or_queue_command(command, &block)
604
+ end
605
+
606
+ # Deletes a channelSection.
607
+ # @param [String] id
608
+ # The id parameter specifies the YouTube channelSection ID for the resource that
609
+ # is being deleted. In a channelSection resource, the id property specifies the
610
+ # YouTube channelSection ID.
611
+ # @param [String] on_behalf_of_content_owner
612
+ # Note: This parameter is intended exclusively for YouTube content partners.
613
+ # The onBehalfOfContentOwner parameter indicates that the request's
614
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
615
+ # of the content owner specified in the parameter value. This parameter is
616
+ # intended for YouTube content partners that own and manage many different
617
+ # YouTube channels. It allows content owners to authenticate once and get access
618
+ # to all their video and channel data, without having to provide authentication
619
+ # credentials for each individual channel. The CMS account that the user
620
+ # authenticates with must be linked to the specified YouTube content owner.
621
+ # @param [String] fields
622
+ # Selector specifying which fields to include in a partial response.
623
+ # @param [String] quota_user
624
+ # Available to use for quota purposes for server-side applications. Can be any
625
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
626
+ # Overrides userIp if both are provided.
627
+ # @param [String] user_ip
628
+ # IP address of the site where the request originates. Use this if you want to
629
+ # enforce per-user limits.
630
+ # @param [Google::Apis::RequestOptions] options
631
+ # Request-specific options
632
+ #
633
+ # @yield [result, err] Result & error if block supplied
634
+ # @yieldparam result [NilClass] No result returned for this method
635
+ # @yieldparam err [StandardError] error object if request failed
636
+ #
637
+ # @return [void]
638
+ #
639
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
640
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
641
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
642
+ def delete_channel_section(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
643
+ path = 'channelSections'
644
+ command = make_simple_command(:delete, path, options)
645
+ command.query['id'] = id unless id.nil?
646
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
647
+ command.query['fields'] = fields unless fields.nil?
648
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
649
+ command.query['userIp'] = user_ip unless user_ip.nil?
650
+ execute_or_queue_command(command, &block)
651
+ end
652
+
653
+ # Adds a channelSection for the authenticated user's channel.
654
+ # @param [Google::Apis::YoutubeV3::ChannelSection] channel_section_object
655
+ # @param [String] on_behalf_of_content_owner
656
+ # Note: This parameter is intended exclusively for YouTube content partners.
657
+ # The onBehalfOfContentOwner parameter indicates that the request's
658
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
659
+ # of the content owner specified in the parameter value. This parameter is
660
+ # intended for YouTube content partners that own and manage many different
661
+ # YouTube channels. It allows content owners to authenticate once and get access
662
+ # to all their video and channel data, without having to provide authentication
663
+ # credentials for each individual channel. The CMS account that the user
664
+ # authenticates with must be linked to the specified YouTube content owner.
665
+ # @param [String] on_behalf_of_content_owner_channel
666
+ # This parameter can only be used in a properly authorized request. Note: This
667
+ # parameter is intended exclusively for YouTube content partners.
668
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
669
+ # of the channel to which a video is being added. This parameter is required
670
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
671
+ # it can only be used in conjunction with that parameter. In addition, the
672
+ # request must be authorized using a CMS account that is linked to the content
673
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
674
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
675
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
676
+ # specifies.
677
+ # This parameter is intended for YouTube content partners that own and manage
678
+ # many different YouTube channels. It allows content owners to authenticate once
679
+ # and perform actions on behalf of the channel specified in the parameter value,
680
+ # without having to provide authentication credentials for each separate channel.
681
+ # @param [String] part
682
+ # The part parameter serves two purposes in this operation. It identifies the
683
+ # properties that the write operation will set as well as the properties that
684
+ # the API response will include.
685
+ # The part names that you can include in the parameter value are snippet and
686
+ # contentDetails.
687
+ # @param [String] fields
688
+ # Selector specifying which fields to include in a partial response.
689
+ # @param [String] quota_user
690
+ # Available to use for quota purposes for server-side applications. Can be any
691
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
692
+ # Overrides userIp if both are provided.
693
+ # @param [String] user_ip
694
+ # IP address of the site where the request originates. Use this if you want to
695
+ # enforce per-user limits.
696
+ # @param [Google::Apis::RequestOptions] options
697
+ # Request-specific options
698
+ #
699
+ # @yield [result, err] Result & error if block supplied
700
+ # @yieldparam result [Google::Apis::YoutubeV3::ChannelSection] parsed result object
701
+ # @yieldparam err [StandardError] error object if request failed
702
+ #
703
+ # @return [Google::Apis::YoutubeV3::ChannelSection]
704
+ #
705
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
706
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
707
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
708
+ def insert_channel_section(channel_section_object = nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
709
+ path = 'channelSections'
710
+ command = make_simple_command(:post, path, options)
711
+ command.request_representation = Google::Apis::YoutubeV3::ChannelSection::Representation
712
+ command.request_object = channel_section_object
713
+ command.response_representation = Google::Apis::YoutubeV3::ChannelSection::Representation
714
+ command.response_class = Google::Apis::YoutubeV3::ChannelSection
715
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
716
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
717
+ command.query['part'] = part unless part.nil?
718
+ command.query['fields'] = fields unless fields.nil?
719
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
720
+ command.query['userIp'] = user_ip unless user_ip.nil?
721
+ execute_or_queue_command(command, &block)
722
+ end
723
+
724
+ # Returns channelSection resources that match the API request criteria.
725
+ # @param [String] channel_id
726
+ # The channelId parameter specifies a YouTube channel ID. The API will only
727
+ # return that channel's channelSections.
728
+ # @param [String] hl
729
+ # The hl parameter indicates that the snippet.localized property values in the
730
+ # returned channelSection resources should be in the specified language if
731
+ # localized values for that language are available. For example, if the API
732
+ # request specifies hl=de, the snippet.localized properties in the API response
733
+ # will contain German titles if German titles are available. Channel owners can
734
+ # provide localized channel section titles using either the channelSections.
735
+ # insert or channelSections.update method.
736
+ # @param [String] id
737
+ # The id parameter specifies a comma-separated list of the YouTube
738
+ # channelSection ID(s) for the resource(s) that are being retrieved. In a
739
+ # channelSection resource, the id property specifies the YouTube channelSection
740
+ # ID.
741
+ # @param [Boolean] mine
742
+ # Set this parameter's value to true to retrieve a feed of the authenticated
743
+ # user's channelSections.
744
+ # @param [String] on_behalf_of_content_owner
745
+ # Note: This parameter is intended exclusively for YouTube content partners.
746
+ # The onBehalfOfContentOwner parameter indicates that the request's
747
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
748
+ # of the content owner specified in the parameter value. This parameter is
749
+ # intended for YouTube content partners that own and manage many different
750
+ # YouTube channels. It allows content owners to authenticate once and get access
751
+ # to all their video and channel data, without having to provide authentication
752
+ # credentials for each individual channel. The CMS account that the user
753
+ # authenticates with must be linked to the specified YouTube content owner.
754
+ # @param [String] part
755
+ # The part parameter specifies a comma-separated list of one or more
756
+ # channelSection resource properties that the API response will include. The
757
+ # part names that you can include in the parameter value are id, snippet, and
758
+ # contentDetails.
759
+ # If the parameter identifies a property that contains child properties, the
760
+ # child properties will be included in the response. For example, in a
761
+ # channelSection resource, the snippet property contains other properties, such
762
+ # as a display title for the channelSection. If you set part=snippet, the API
763
+ # response will also contain all of those nested properties.
764
+ # @param [String] fields
765
+ # Selector specifying which fields to include in a partial response.
766
+ # @param [String] quota_user
767
+ # Available to use for quota purposes for server-side applications. Can be any
768
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
769
+ # Overrides userIp if both are provided.
770
+ # @param [String] user_ip
771
+ # IP address of the site where the request originates. Use this if you want to
772
+ # enforce per-user limits.
773
+ # @param [Google::Apis::RequestOptions] options
774
+ # Request-specific options
775
+ #
776
+ # @yield [result, err] Result & error if block supplied
777
+ # @yieldparam result [Google::Apis::YoutubeV3::ListChannelSectionsResponse] parsed result object
778
+ # @yieldparam err [StandardError] error object if request failed
779
+ #
780
+ # @return [Google::Apis::YoutubeV3::ListChannelSectionsResponse]
781
+ #
782
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
783
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
784
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
785
+ def list_channel_sections(channel_id: nil, hl: nil, id: nil, mine: nil, on_behalf_of_content_owner: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
786
+ path = 'channelSections'
787
+ command = make_simple_command(:get, path, options)
788
+ command.response_representation = Google::Apis::YoutubeV3::ListChannelSectionsResponse::Representation
789
+ command.response_class = Google::Apis::YoutubeV3::ListChannelSectionsResponse
790
+ command.query['channelId'] = channel_id unless channel_id.nil?
791
+ command.query['hl'] = hl unless hl.nil?
792
+ command.query['id'] = id unless id.nil?
793
+ command.query['mine'] = mine unless mine.nil?
794
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
795
+ command.query['part'] = part unless part.nil?
796
+ command.query['fields'] = fields unless fields.nil?
797
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
798
+ command.query['userIp'] = user_ip unless user_ip.nil?
799
+ execute_or_queue_command(command, &block)
800
+ end
801
+
802
+ # Update a channelSection.
803
+ # @param [Google::Apis::YoutubeV3::ChannelSection] channel_section_object
804
+ # @param [String] on_behalf_of_content_owner
805
+ # Note: This parameter is intended exclusively for YouTube content partners.
806
+ # The onBehalfOfContentOwner parameter indicates that the request's
807
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
808
+ # of the content owner specified in the parameter value. This parameter is
809
+ # intended for YouTube content partners that own and manage many different
810
+ # YouTube channels. It allows content owners to authenticate once and get access
811
+ # to all their video and channel data, without having to provide authentication
812
+ # credentials for each individual channel. The CMS account that the user
813
+ # authenticates with must be linked to the specified YouTube content owner.
814
+ # @param [String] part
815
+ # The part parameter serves two purposes in this operation. It identifies the
816
+ # properties that the write operation will set as well as the properties that
817
+ # the API response will include.
818
+ # The part names that you can include in the parameter value are snippet and
819
+ # contentDetails.
820
+ # @param [String] fields
821
+ # Selector specifying which fields to include in a partial response.
822
+ # @param [String] quota_user
823
+ # Available to use for quota purposes for server-side applications. Can be any
824
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
825
+ # Overrides userIp if both are provided.
826
+ # @param [String] user_ip
827
+ # IP address of the site where the request originates. Use this if you want to
828
+ # enforce per-user limits.
829
+ # @param [Google::Apis::RequestOptions] options
830
+ # Request-specific options
831
+ #
832
+ # @yield [result, err] Result & error if block supplied
833
+ # @yieldparam result [Google::Apis::YoutubeV3::ChannelSection] parsed result object
834
+ # @yieldparam err [StandardError] error object if request failed
835
+ #
836
+ # @return [Google::Apis::YoutubeV3::ChannelSection]
837
+ #
838
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
839
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
840
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
841
+ def update_channel_section(channel_section_object = nil, on_behalf_of_content_owner: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
842
+ path = 'channelSections'
843
+ command = make_simple_command(:put, path, options)
844
+ command.request_representation = Google::Apis::YoutubeV3::ChannelSection::Representation
845
+ command.request_object = channel_section_object
846
+ command.response_representation = Google::Apis::YoutubeV3::ChannelSection::Representation
847
+ command.response_class = Google::Apis::YoutubeV3::ChannelSection
848
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
849
+ command.query['part'] = part unless part.nil?
850
+ command.query['fields'] = fields unless fields.nil?
851
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
852
+ command.query['userIp'] = user_ip unless user_ip.nil?
853
+ execute_or_queue_command(command, &block)
854
+ end
855
+
856
+ # Returns a collection of zero or more channel resources that match the request
857
+ # criteria.
858
+ # @param [String] category_id
859
+ # The categoryId parameter specifies a YouTube guide category, thereby
860
+ # requesting YouTube channels associated with that category.
861
+ # @param [String] for_username
862
+ # The forUsername parameter specifies a YouTube username, thereby requesting the
863
+ # channel associated with that username.
864
+ # @param [String] hl
865
+ # The hl parameter should be used for filter out the properties that are not in
866
+ # the given language. Used for the brandingSettings part.
867
+ # @param [String] id
868
+ # The id parameter specifies a comma-separated list of the YouTube channel ID(s)
869
+ # for the resource(s) that are being retrieved. In a channel resource, the id
870
+ # property specifies the channel's YouTube channel ID.
871
+ # @param [Boolean] managed_by_me
872
+ # Note: This parameter is intended exclusively for YouTube content partners.
873
+ # Set this parameter's value to true to instruct the API to only return channels
874
+ # managed by the content owner that the onBehalfOfContentOwner parameter
875
+ # specifies. The user must be authenticated as a CMS account linked to the
876
+ # specified content owner and onBehalfOfContentOwner must be provided.
877
+ # @param [Fixnum] max_results
878
+ # The maxResults parameter specifies the maximum number of items that should be
879
+ # returned in the result set.
880
+ # @param [Boolean] mine
881
+ # Set this parameter's value to true to instruct the API to only return channels
882
+ # owned by the authenticated user.
883
+ # @param [Boolean] my_subscribers
884
+ # Use the subscriptions.list method and its mySubscribers parameter to retrieve
885
+ # a list of subscribers to the authenticated user's channel.
886
+ # @param [String] on_behalf_of_content_owner
887
+ # Note: This parameter is intended exclusively for YouTube content partners.
888
+ # The onBehalfOfContentOwner parameter indicates that the request's
889
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
890
+ # of the content owner specified in the parameter value. This parameter is
891
+ # intended for YouTube content partners that own and manage many different
892
+ # YouTube channels. It allows content owners to authenticate once and get access
893
+ # to all their video and channel data, without having to provide authentication
894
+ # credentials for each individual channel. The CMS account that the user
895
+ # authenticates with must be linked to the specified YouTube content owner.
896
+ # @param [String] page_token
897
+ # The pageToken parameter identifies a specific page in the result set that
898
+ # should be returned. In an API response, the nextPageToken and prevPageToken
899
+ # properties identify other pages that could be retrieved.
900
+ # @param [String] part
901
+ # The part parameter specifies a comma-separated list of one or more channel
902
+ # resource properties that the API response will include.
903
+ # If the parameter identifies a property that contains child properties, the
904
+ # child properties will be included in the response. For example, in a channel
905
+ # resource, the contentDetails property contains other properties, such as the
906
+ # uploads properties. As such, if you set part=contentDetails, the API response
907
+ # will also contain all of those nested properties.
908
+ # @param [String] fields
909
+ # Selector specifying which fields to include in a partial response.
910
+ # @param [String] quota_user
911
+ # Available to use for quota purposes for server-side applications. Can be any
912
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
913
+ # Overrides userIp if both are provided.
914
+ # @param [String] user_ip
915
+ # IP address of the site where the request originates. Use this if you want to
916
+ # enforce per-user limits.
917
+ # @param [Google::Apis::RequestOptions] options
918
+ # Request-specific options
919
+ #
920
+ # @yield [result, err] Result & error if block supplied
921
+ # @yieldparam result [Google::Apis::YoutubeV3::ListChannelsResponse] parsed result object
922
+ # @yieldparam err [StandardError] error object if request failed
923
+ #
924
+ # @return [Google::Apis::YoutubeV3::ListChannelsResponse]
925
+ #
926
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
927
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
928
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
929
+ def list_channels(category_id: nil, for_username: nil, hl: nil, id: nil, managed_by_me: nil, max_results: nil, mine: nil, my_subscribers: nil, on_behalf_of_content_owner: nil, page_token: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
930
+ path = 'channels'
931
+ command = make_simple_command(:get, path, options)
932
+ command.response_representation = Google::Apis::YoutubeV3::ListChannelsResponse::Representation
933
+ command.response_class = Google::Apis::YoutubeV3::ListChannelsResponse
934
+ command.query['categoryId'] = category_id unless category_id.nil?
935
+ command.query['forUsername'] = for_username unless for_username.nil?
936
+ command.query['hl'] = hl unless hl.nil?
937
+ command.query['id'] = id unless id.nil?
938
+ command.query['managedByMe'] = managed_by_me unless managed_by_me.nil?
939
+ command.query['maxResults'] = max_results unless max_results.nil?
940
+ command.query['mine'] = mine unless mine.nil?
941
+ command.query['mySubscribers'] = my_subscribers unless my_subscribers.nil?
942
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
943
+ command.query['pageToken'] = page_token unless page_token.nil?
944
+ command.query['part'] = part unless part.nil?
945
+ command.query['fields'] = fields unless fields.nil?
946
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
947
+ command.query['userIp'] = user_ip unless user_ip.nil?
948
+ execute_or_queue_command(command, &block)
949
+ end
950
+
951
+ # Updates a channel's metadata. Note that this method currently only supports
952
+ # updates to the channel resource's brandingSettings and invideoPromotion
953
+ # objects and their child properties.
954
+ # @param [Google::Apis::YoutubeV3::Channel] channel_object
955
+ # @param [String] on_behalf_of_content_owner
956
+ # The onBehalfOfContentOwner parameter indicates that the authenticated user is
957
+ # acting on behalf of the content owner specified in the parameter value. This
958
+ # parameter is intended for YouTube content partners that own and manage many
959
+ # different YouTube channels. It allows content owners to authenticate once and
960
+ # get access to all their video and channel data, without having to provide
961
+ # authentication credentials for each individual channel. The actual CMS account
962
+ # that the user authenticates with needs to be linked to the specified YouTube
963
+ # content owner.
964
+ # @param [String] part
965
+ # The part parameter serves two purposes in this operation. It identifies the
966
+ # properties that the write operation will set as well as the properties that
967
+ # the API response will include.
968
+ # The API currently only allows the parameter value to be set to either
969
+ # brandingSettings or invideoPromotion. (You cannot update both of those parts
970
+ # with a single request.)
971
+ # Note that this method overrides the existing values for all of the mutable
972
+ # properties that are contained in any parts that the parameter value specifies.
973
+ # @param [String] fields
974
+ # Selector specifying which fields to include in a partial response.
975
+ # @param [String] quota_user
976
+ # Available to use for quota purposes for server-side applications. Can be any
977
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
978
+ # Overrides userIp if both are provided.
979
+ # @param [String] user_ip
980
+ # IP address of the site where the request originates. Use this if you want to
981
+ # enforce per-user limits.
982
+ # @param [Google::Apis::RequestOptions] options
983
+ # Request-specific options
984
+ #
985
+ # @yield [result, err] Result & error if block supplied
986
+ # @yieldparam result [Google::Apis::YoutubeV3::Channel] parsed result object
987
+ # @yieldparam err [StandardError] error object if request failed
988
+ #
989
+ # @return [Google::Apis::YoutubeV3::Channel]
990
+ #
991
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
992
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
993
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
994
+ def update_channel(channel_object = nil, on_behalf_of_content_owner: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
995
+ path = 'channels'
996
+ command = make_simple_command(:put, path, options)
997
+ command.request_representation = Google::Apis::YoutubeV3::Channel::Representation
998
+ command.request_object = channel_object
999
+ command.response_representation = Google::Apis::YoutubeV3::Channel::Representation
1000
+ command.response_class = Google::Apis::YoutubeV3::Channel
1001
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1002
+ command.query['part'] = part unless part.nil?
1003
+ command.query['fields'] = fields unless fields.nil?
1004
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1005
+ command.query['userIp'] = user_ip unless user_ip.nil?
1006
+ execute_or_queue_command(command, &block)
1007
+ end
1008
+
1009
+ # Creates a new top-level comment. To add a reply to an existing comment, use
1010
+ # the comments.insert method instead.
1011
+ # @param [Google::Apis::YoutubeV3::CommentThread] comment_thread_object
1012
+ # @param [String] part
1013
+ # The part parameter identifies the properties that the API response will
1014
+ # include. Set the parameter value to snippet. The snippet part has a quota cost
1015
+ # of 2 units.
1016
+ # @param [Boolean] share_on_google_plus
1017
+ # The shareOnGooglePlus parameter indicates whether the top-level comment and
1018
+ # any replies that are made to that comment should also be posted to the author'
1019
+ # s Google+ profile.
1020
+ # @param [String] fields
1021
+ # Selector specifying which fields to include in a partial response.
1022
+ # @param [String] quota_user
1023
+ # Available to use for quota purposes for server-side applications. Can be any
1024
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1025
+ # Overrides userIp if both are provided.
1026
+ # @param [String] user_ip
1027
+ # IP address of the site where the request originates. Use this if you want to
1028
+ # enforce per-user limits.
1029
+ # @param [Google::Apis::RequestOptions] options
1030
+ # Request-specific options
1031
+ #
1032
+ # @yield [result, err] Result & error if block supplied
1033
+ # @yieldparam result [Google::Apis::YoutubeV3::CommentThread] parsed result object
1034
+ # @yieldparam err [StandardError] error object if request failed
1035
+ #
1036
+ # @return [Google::Apis::YoutubeV3::CommentThread]
1037
+ #
1038
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1039
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1040
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1041
+ def insert_comment_thread(comment_thread_object = nil, part: nil, share_on_google_plus: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1042
+ path = 'commentThreads'
1043
+ command = make_simple_command(:post, path, options)
1044
+ command.request_representation = Google::Apis::YoutubeV3::CommentThread::Representation
1045
+ command.request_object = comment_thread_object
1046
+ command.response_representation = Google::Apis::YoutubeV3::CommentThread::Representation
1047
+ command.response_class = Google::Apis::YoutubeV3::CommentThread
1048
+ command.query['part'] = part unless part.nil?
1049
+ command.query['shareOnGooglePlus'] = share_on_google_plus unless share_on_google_plus.nil?
1050
+ command.query['fields'] = fields unless fields.nil?
1051
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1052
+ command.query['userIp'] = user_ip unless user_ip.nil?
1053
+ execute_or_queue_command(command, &block)
1054
+ end
1055
+
1056
+ # Returns a list of comment threads that match the API request parameters.
1057
+ # @param [String] all_threads_related_to_channel_id
1058
+ # The allThreadsRelatedToChannelId parameter instructs the API to return all
1059
+ # comment threads associated with the specified channel. The response can
1060
+ # include comments about the channel or about the channel's videos.
1061
+ # @param [String] channel_id
1062
+ # The channelId parameter instructs the API to return comment threads containing
1063
+ # comments about the specified channel. (The response will not include comments
1064
+ # left on videos that the channel uploaded.)
1065
+ # @param [String] id
1066
+ # The id parameter specifies a comma-separated list of comment thread IDs for
1067
+ # the resources that should be retrieved.
1068
+ # @param [Fixnum] max_results
1069
+ # The maxResults parameter specifies the maximum number of items that should be
1070
+ # returned in the result set.
1071
+ # Note: This parameter is not supported for use in conjunction with the id
1072
+ # parameter.
1073
+ # @param [String] moderation_status
1074
+ # Set this parameter to limit the returned comment threads to a particular
1075
+ # moderation state.
1076
+ # Note: This parameter is not supported for use in conjunction with the id
1077
+ # parameter.
1078
+ # @param [String] order
1079
+ # The order parameter specifies the order in which the API response should list
1080
+ # comment threads. Valid values are:
1081
+ # - time - Comment threads are ordered by time. This is the default behavior.
1082
+ # - relevance - Comment threads are ordered by relevance.Note: This parameter is
1083
+ # not supported for use in conjunction with the id parameter.
1084
+ # @param [String] page_token
1085
+ # The pageToken parameter identifies a specific page in the result set that
1086
+ # should be returned. In an API response, the nextPageToken property identifies
1087
+ # the next page of the result that can be retrieved.
1088
+ # Note: This parameter is not supported for use in conjunction with the id
1089
+ # parameter.
1090
+ # @param [String] part
1091
+ # The part parameter specifies a comma-separated list of one or more
1092
+ # commentThread resource properties that the API response will include.
1093
+ # @param [String] search_terms
1094
+ # The searchTerms parameter instructs the API to limit the API response to only
1095
+ # contain comments that contain the specified search terms.
1096
+ # Note: This parameter is not supported for use in conjunction with the id
1097
+ # parameter.
1098
+ # @param [String] text_format
1099
+ # Set this parameter's value to html or plainText to instruct the API to return
1100
+ # the comments left by users in html formatted or in plain text.
1101
+ # @param [String] video_id
1102
+ # The videoId parameter instructs the API to return comment threads associated
1103
+ # with the specified video ID.
1104
+ # @param [String] fields
1105
+ # Selector specifying which fields to include in a partial response.
1106
+ # @param [String] quota_user
1107
+ # Available to use for quota purposes for server-side applications. Can be any
1108
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1109
+ # Overrides userIp if both are provided.
1110
+ # @param [String] user_ip
1111
+ # IP address of the site where the request originates. Use this if you want to
1112
+ # enforce per-user limits.
1113
+ # @param [Google::Apis::RequestOptions] options
1114
+ # Request-specific options
1115
+ #
1116
+ # @yield [result, err] Result & error if block supplied
1117
+ # @yieldparam result [Google::Apis::YoutubeV3::ListCommentThreadsResponse] parsed result object
1118
+ # @yieldparam err [StandardError] error object if request failed
1119
+ #
1120
+ # @return [Google::Apis::YoutubeV3::ListCommentThreadsResponse]
1121
+ #
1122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1125
+ def list_comment_threads(all_threads_related_to_channel_id: nil, channel_id: nil, id: nil, max_results: nil, moderation_status: nil, order: nil, page_token: nil, part: nil, search_terms: nil, text_format: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1126
+ path = 'commentThreads'
1127
+ command = make_simple_command(:get, path, options)
1128
+ command.response_representation = Google::Apis::YoutubeV3::ListCommentThreadsResponse::Representation
1129
+ command.response_class = Google::Apis::YoutubeV3::ListCommentThreadsResponse
1130
+ command.query['allThreadsRelatedToChannelId'] = all_threads_related_to_channel_id unless all_threads_related_to_channel_id.nil?
1131
+ command.query['channelId'] = channel_id unless channel_id.nil?
1132
+ command.query['id'] = id unless id.nil?
1133
+ command.query['maxResults'] = max_results unless max_results.nil?
1134
+ command.query['moderationStatus'] = moderation_status unless moderation_status.nil?
1135
+ command.query['order'] = order unless order.nil?
1136
+ command.query['pageToken'] = page_token unless page_token.nil?
1137
+ command.query['part'] = part unless part.nil?
1138
+ command.query['searchTerms'] = search_terms unless search_terms.nil?
1139
+ command.query['textFormat'] = text_format unless text_format.nil?
1140
+ command.query['videoId'] = video_id unless video_id.nil?
1141
+ command.query['fields'] = fields unless fields.nil?
1142
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1143
+ command.query['userIp'] = user_ip unless user_ip.nil?
1144
+ execute_or_queue_command(command, &block)
1145
+ end
1146
+
1147
+ # Modifies the top-level comment in a comment thread.
1148
+ # @param [Google::Apis::YoutubeV3::CommentThread] comment_thread_object
1149
+ # @param [String] part
1150
+ # The part parameter specifies a comma-separated list of commentThread resource
1151
+ # properties that the API response will include. You must at least include the
1152
+ # snippet part in the parameter value since that part contains all of the
1153
+ # properties that the API request can update.
1154
+ # @param [String] fields
1155
+ # Selector specifying which fields to include in a partial response.
1156
+ # @param [String] quota_user
1157
+ # Available to use for quota purposes for server-side applications. Can be any
1158
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1159
+ # Overrides userIp if both are provided.
1160
+ # @param [String] user_ip
1161
+ # IP address of the site where the request originates. Use this if you want to
1162
+ # enforce per-user limits.
1163
+ # @param [Google::Apis::RequestOptions] options
1164
+ # Request-specific options
1165
+ #
1166
+ # @yield [result, err] Result & error if block supplied
1167
+ # @yieldparam result [Google::Apis::YoutubeV3::CommentThread] parsed result object
1168
+ # @yieldparam err [StandardError] error object if request failed
1169
+ #
1170
+ # @return [Google::Apis::YoutubeV3::CommentThread]
1171
+ #
1172
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1173
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1174
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1175
+ def update_comment_thread(comment_thread_object = nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1176
+ path = 'commentThreads'
1177
+ command = make_simple_command(:put, path, options)
1178
+ command.request_representation = Google::Apis::YoutubeV3::CommentThread::Representation
1179
+ command.request_object = comment_thread_object
1180
+ command.response_representation = Google::Apis::YoutubeV3::CommentThread::Representation
1181
+ command.response_class = Google::Apis::YoutubeV3::CommentThread
1182
+ command.query['part'] = part unless part.nil?
1183
+ command.query['fields'] = fields unless fields.nil?
1184
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1185
+ command.query['userIp'] = user_ip unless user_ip.nil?
1186
+ execute_or_queue_command(command, &block)
1187
+ end
1188
+
1189
+ # Deletes a comment.
1190
+ # @param [String] id
1191
+ # The id parameter specifies the comment ID for the resource that is being
1192
+ # deleted.
1193
+ # @param [String] fields
1194
+ # Selector specifying which fields to include in a partial response.
1195
+ # @param [String] quota_user
1196
+ # Available to use for quota purposes for server-side applications. Can be any
1197
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1198
+ # Overrides userIp if both are provided.
1199
+ # @param [String] user_ip
1200
+ # IP address of the site where the request originates. Use this if you want to
1201
+ # enforce per-user limits.
1202
+ # @param [Google::Apis::RequestOptions] options
1203
+ # Request-specific options
1204
+ #
1205
+ # @yield [result, err] Result & error if block supplied
1206
+ # @yieldparam result [NilClass] No result returned for this method
1207
+ # @yieldparam err [StandardError] error object if request failed
1208
+ #
1209
+ # @return [void]
1210
+ #
1211
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1212
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1213
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1214
+ def delete_comment(id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1215
+ path = 'comments'
1216
+ command = make_simple_command(:delete, path, options)
1217
+ command.query['id'] = id unless id.nil?
1218
+ command.query['fields'] = fields unless fields.nil?
1219
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1220
+ command.query['userIp'] = user_ip unless user_ip.nil?
1221
+ execute_or_queue_command(command, &block)
1222
+ end
1223
+
1224
+ # Creates a reply to an existing comment. Note: To create a top-level comment,
1225
+ # use the commentThreads.insert method.
1226
+ # @param [Google::Apis::YoutubeV3::Comment] comment_object
1227
+ # @param [String] part
1228
+ # The part parameter identifies the properties that the API response will
1229
+ # include. Set the parameter value to snippet. The snippet part has a quota cost
1230
+ # of 2 units.
1231
+ # @param [String] fields
1232
+ # Selector specifying which fields to include in a partial response.
1233
+ # @param [String] quota_user
1234
+ # Available to use for quota purposes for server-side applications. Can be any
1235
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1236
+ # Overrides userIp if both are provided.
1237
+ # @param [String] user_ip
1238
+ # IP address of the site where the request originates. Use this if you want to
1239
+ # enforce per-user limits.
1240
+ # @param [Google::Apis::RequestOptions] options
1241
+ # Request-specific options
1242
+ #
1243
+ # @yield [result, err] Result & error if block supplied
1244
+ # @yieldparam result [Google::Apis::YoutubeV3::Comment] parsed result object
1245
+ # @yieldparam err [StandardError] error object if request failed
1246
+ #
1247
+ # @return [Google::Apis::YoutubeV3::Comment]
1248
+ #
1249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1252
+ def insert_comment(comment_object = nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1253
+ path = 'comments'
1254
+ command = make_simple_command(:post, path, options)
1255
+ command.request_representation = Google::Apis::YoutubeV3::Comment::Representation
1256
+ command.request_object = comment_object
1257
+ command.response_representation = Google::Apis::YoutubeV3::Comment::Representation
1258
+ command.response_class = Google::Apis::YoutubeV3::Comment
1259
+ command.query['part'] = part unless part.nil?
1260
+ command.query['fields'] = fields unless fields.nil?
1261
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1262
+ command.query['userIp'] = user_ip unless user_ip.nil?
1263
+ execute_or_queue_command(command, &block)
1264
+ end
1265
+
1266
+ # Returns a list of comments that match the API request parameters.
1267
+ # @param [String] id
1268
+ # The id parameter specifies a comma-separated list of comment IDs for the
1269
+ # resources that are being retrieved. In a comment resource, the id property
1270
+ # specifies the comment's ID.
1271
+ # @param [Fixnum] max_results
1272
+ # The maxResults parameter specifies the maximum number of items that should be
1273
+ # returned in the result set.
1274
+ # Note: This parameter is not supported for use in conjunction with the id
1275
+ # parameter.
1276
+ # @param [String] page_token
1277
+ # The pageToken parameter identifies a specific page in the result set that
1278
+ # should be returned. In an API response, the nextPageToken property identifies
1279
+ # the next page of the result that can be retrieved.
1280
+ # Note: This parameter is not supported for use in conjunction with the id
1281
+ # parameter.
1282
+ # @param [String] parent_id
1283
+ # The parentId parameter specifies the ID of the comment for which replies
1284
+ # should be retrieved.
1285
+ # Note: YouTube currently supports replies only for top-level comments. However,
1286
+ # replies to replies may be supported in the future.
1287
+ # @param [String] part
1288
+ # The part parameter specifies a comma-separated list of one or more comment
1289
+ # resource properties that the API response will include.
1290
+ # @param [String] text_format
1291
+ # This parameter indicates whether the API should return comments formatted as
1292
+ # HTML or as plain text.
1293
+ # @param [String] fields
1294
+ # Selector specifying which fields to include in a partial response.
1295
+ # @param [String] quota_user
1296
+ # Available to use for quota purposes for server-side applications. Can be any
1297
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1298
+ # Overrides userIp if both are provided.
1299
+ # @param [String] user_ip
1300
+ # IP address of the site where the request originates. Use this if you want to
1301
+ # enforce per-user limits.
1302
+ # @param [Google::Apis::RequestOptions] options
1303
+ # Request-specific options
1304
+ #
1305
+ # @yield [result, err] Result & error if block supplied
1306
+ # @yieldparam result [Google::Apis::YoutubeV3::ListCommentsResponse] parsed result object
1307
+ # @yieldparam err [StandardError] error object if request failed
1308
+ #
1309
+ # @return [Google::Apis::YoutubeV3::ListCommentsResponse]
1310
+ #
1311
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1312
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1313
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1314
+ def list_comments(id: nil, max_results: nil, page_token: nil, parent_id: nil, part: nil, text_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1315
+ path = 'comments'
1316
+ command = make_simple_command(:get, path, options)
1317
+ command.response_representation = Google::Apis::YoutubeV3::ListCommentsResponse::Representation
1318
+ command.response_class = Google::Apis::YoutubeV3::ListCommentsResponse
1319
+ command.query['id'] = id unless id.nil?
1320
+ command.query['maxResults'] = max_results unless max_results.nil?
1321
+ command.query['pageToken'] = page_token unless page_token.nil?
1322
+ command.query['parentId'] = parent_id unless parent_id.nil?
1323
+ command.query['part'] = part unless part.nil?
1324
+ command.query['textFormat'] = text_format unless text_format.nil?
1325
+ command.query['fields'] = fields unless fields.nil?
1326
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1327
+ command.query['userIp'] = user_ip unless user_ip.nil?
1328
+ execute_or_queue_command(command, &block)
1329
+ end
1330
+
1331
+ # Expresses the caller's opinion that one or more comments should be flagged as
1332
+ # spam.
1333
+ # @param [String] id
1334
+ # The id parameter specifies a comma-separated list of IDs of comments that the
1335
+ # caller believes should be classified as spam.
1336
+ # @param [String] fields
1337
+ # Selector specifying which fields to include in a partial response.
1338
+ # @param [String] quota_user
1339
+ # Available to use for quota purposes for server-side applications. Can be any
1340
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1341
+ # Overrides userIp if both are provided.
1342
+ # @param [String] user_ip
1343
+ # IP address of the site where the request originates. Use this if you want to
1344
+ # enforce per-user limits.
1345
+ # @param [Google::Apis::RequestOptions] options
1346
+ # Request-specific options
1347
+ #
1348
+ # @yield [result, err] Result & error if block supplied
1349
+ # @yieldparam result [NilClass] No result returned for this method
1350
+ # @yieldparam err [StandardError] error object if request failed
1351
+ #
1352
+ # @return [void]
1353
+ #
1354
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1355
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1356
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1357
+ def mark_as_spam_comment(id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1358
+ path = 'comments/markAsSpam'
1359
+ command = make_simple_command(:post, path, options)
1360
+ command.query['id'] = id unless id.nil?
1361
+ command.query['fields'] = fields unless fields.nil?
1362
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1363
+ command.query['userIp'] = user_ip unless user_ip.nil?
1364
+ execute_or_queue_command(command, &block)
1365
+ end
1366
+
1367
+ # Sets the moderation status of one or more comments. The API request must be
1368
+ # authorized by the owner of the channel or video associated with the comments.
1369
+ # @param [Boolean] ban_author
1370
+ # The banAuthor parameter lets you indicate that you want to automatically
1371
+ # reject any additional comments written by the comment's author. Set the
1372
+ # parameter value to true to ban the author.
1373
+ # Note: This parameter is only valid if the moderationStatus parameter is also
1374
+ # set to rejected.
1375
+ # @param [String] id
1376
+ # The id parameter specifies a comma-separated list of IDs that identify the
1377
+ # comments for which you are updating the moderation status.
1378
+ # @param [String] moderation_status
1379
+ # Identifies the new moderation status of the specified comments.
1380
+ # @param [String] fields
1381
+ # Selector specifying which fields to include in a partial response.
1382
+ # @param [String] quota_user
1383
+ # Available to use for quota purposes for server-side applications. Can be any
1384
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1385
+ # Overrides userIp if both are provided.
1386
+ # @param [String] user_ip
1387
+ # IP address of the site where the request originates. Use this if you want to
1388
+ # enforce per-user limits.
1389
+ # @param [Google::Apis::RequestOptions] options
1390
+ # Request-specific options
1391
+ #
1392
+ # @yield [result, err] Result & error if block supplied
1393
+ # @yieldparam result [NilClass] No result returned for this method
1394
+ # @yieldparam err [StandardError] error object if request failed
1395
+ #
1396
+ # @return [void]
1397
+ #
1398
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1399
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1400
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1401
+ def set_comment_moderation_status(ban_author: nil, id: nil, moderation_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1402
+ path = 'comments/setModerationStatus'
1403
+ command = make_simple_command(:post, path, options)
1404
+ command.query['banAuthor'] = ban_author unless ban_author.nil?
1405
+ command.query['id'] = id unless id.nil?
1406
+ command.query['moderationStatus'] = moderation_status unless moderation_status.nil?
1407
+ command.query['fields'] = fields unless fields.nil?
1408
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1409
+ command.query['userIp'] = user_ip unless user_ip.nil?
1410
+ execute_or_queue_command(command, &block)
1411
+ end
1412
+
1413
+ # Modifies a comment.
1414
+ # @param [Google::Apis::YoutubeV3::Comment] comment_object
1415
+ # @param [String] part
1416
+ # The part parameter identifies the properties that the API response will
1417
+ # include. You must at least include the snippet part in the parameter value
1418
+ # since that part contains all of the properties that the API request can update.
1419
+ # @param [String] fields
1420
+ # Selector specifying which fields to include in a partial response.
1421
+ # @param [String] quota_user
1422
+ # Available to use for quota purposes for server-side applications. Can be any
1423
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1424
+ # Overrides userIp if both are provided.
1425
+ # @param [String] user_ip
1426
+ # IP address of the site where the request originates. Use this if you want to
1427
+ # enforce per-user limits.
1428
+ # @param [Google::Apis::RequestOptions] options
1429
+ # Request-specific options
1430
+ #
1431
+ # @yield [result, err] Result & error if block supplied
1432
+ # @yieldparam result [Google::Apis::YoutubeV3::Comment] parsed result object
1433
+ # @yieldparam err [StandardError] error object if request failed
1434
+ #
1435
+ # @return [Google::Apis::YoutubeV3::Comment]
1436
+ #
1437
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1438
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1439
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1440
+ def update_comment(comment_object = nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1441
+ path = 'comments'
1442
+ command = make_simple_command(:put, path, options)
1443
+ command.request_representation = Google::Apis::YoutubeV3::Comment::Representation
1444
+ command.request_object = comment_object
1445
+ command.response_representation = Google::Apis::YoutubeV3::Comment::Representation
1446
+ command.response_class = Google::Apis::YoutubeV3::Comment
1447
+ command.query['part'] = part unless part.nil?
1448
+ command.query['fields'] = fields unless fields.nil?
1449
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1450
+ command.query['userIp'] = user_ip unless user_ip.nil?
1451
+ execute_or_queue_command(command, &block)
1452
+ end
1453
+
1454
+ # Returns a list of categories that can be associated with YouTube channels.
1455
+ # @param [String] hl
1456
+ # The hl parameter specifies the language that will be used for text values in
1457
+ # the API response.
1458
+ # @param [String] id
1459
+ # The id parameter specifies a comma-separated list of the YouTube channel
1460
+ # category ID(s) for the resource(s) that are being retrieved. In a
1461
+ # guideCategory resource, the id property specifies the YouTube channel category
1462
+ # ID.
1463
+ # @param [String] part
1464
+ # The part parameter specifies the guideCategory resource properties that the
1465
+ # API response will include. Set the parameter value to snippet.
1466
+ # @param [String] region_code
1467
+ # The regionCode parameter instructs the API to return the list of guide
1468
+ # categories available in the specified country. The parameter value is an ISO
1469
+ # 3166-1 alpha-2 country code.
1470
+ # @param [String] fields
1471
+ # Selector specifying which fields to include in a partial response.
1472
+ # @param [String] quota_user
1473
+ # Available to use for quota purposes for server-side applications. Can be any
1474
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1475
+ # Overrides userIp if both are provided.
1476
+ # @param [String] user_ip
1477
+ # IP address of the site where the request originates. Use this if you want to
1478
+ # enforce per-user limits.
1479
+ # @param [Google::Apis::RequestOptions] options
1480
+ # Request-specific options
1481
+ #
1482
+ # @yield [result, err] Result & error if block supplied
1483
+ # @yieldparam result [Google::Apis::YoutubeV3::ListGuideCategoriesResponse] parsed result object
1484
+ # @yieldparam err [StandardError] error object if request failed
1485
+ #
1486
+ # @return [Google::Apis::YoutubeV3::ListGuideCategoriesResponse]
1487
+ #
1488
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1489
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1490
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1491
+ def list_guide_categories(hl: nil, id: nil, part: nil, region_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1492
+ path = 'guideCategories'
1493
+ command = make_simple_command(:get, path, options)
1494
+ command.response_representation = Google::Apis::YoutubeV3::ListGuideCategoriesResponse::Representation
1495
+ command.response_class = Google::Apis::YoutubeV3::ListGuideCategoriesResponse
1496
+ command.query['hl'] = hl unless hl.nil?
1497
+ command.query['id'] = id unless id.nil?
1498
+ command.query['part'] = part unless part.nil?
1499
+ command.query['regionCode'] = region_code unless region_code.nil?
1500
+ command.query['fields'] = fields unless fields.nil?
1501
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1502
+ command.query['userIp'] = user_ip unless user_ip.nil?
1503
+ execute_or_queue_command(command, &block)
1504
+ end
1505
+
1506
+ # Returns a list of application languages that the YouTube website supports.
1507
+ # @param [String] hl
1508
+ # The hl parameter specifies the language that should be used for text values in
1509
+ # the API response.
1510
+ # @param [String] part
1511
+ # The part parameter specifies the i18nLanguage resource properties that the API
1512
+ # response will include. Set the parameter value to snippet.
1513
+ # @param [String] fields
1514
+ # Selector specifying which fields to include in a partial response.
1515
+ # @param [String] quota_user
1516
+ # Available to use for quota purposes for server-side applications. Can be any
1517
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1518
+ # Overrides userIp if both are provided.
1519
+ # @param [String] user_ip
1520
+ # IP address of the site where the request originates. Use this if you want to
1521
+ # enforce per-user limits.
1522
+ # @param [Google::Apis::RequestOptions] options
1523
+ # Request-specific options
1524
+ #
1525
+ # @yield [result, err] Result & error if block supplied
1526
+ # @yieldparam result [Google::Apis::YoutubeV3::ListI18nLanguagesResponse] parsed result object
1527
+ # @yieldparam err [StandardError] error object if request failed
1528
+ #
1529
+ # @return [Google::Apis::YoutubeV3::ListI18nLanguagesResponse]
1530
+ #
1531
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1532
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1533
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1534
+ def list_i18n_languages(hl: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1535
+ path = 'i18nLanguages'
1536
+ command = make_simple_command(:get, path, options)
1537
+ command.response_representation = Google::Apis::YoutubeV3::ListI18nLanguagesResponse::Representation
1538
+ command.response_class = Google::Apis::YoutubeV3::ListI18nLanguagesResponse
1539
+ command.query['hl'] = hl unless hl.nil?
1540
+ command.query['part'] = part unless part.nil?
1541
+ command.query['fields'] = fields unless fields.nil?
1542
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1543
+ command.query['userIp'] = user_ip unless user_ip.nil?
1544
+ execute_or_queue_command(command, &block)
1545
+ end
1546
+
1547
+ # Returns a list of content regions that the YouTube website supports.
1548
+ # @param [String] hl
1549
+ # The hl parameter specifies the language that should be used for text values in
1550
+ # the API response.
1551
+ # @param [String] part
1552
+ # The part parameter specifies the i18nRegion resource properties that the API
1553
+ # response will include. Set the parameter value to snippet.
1554
+ # @param [String] fields
1555
+ # Selector specifying which fields to include in a partial response.
1556
+ # @param [String] quota_user
1557
+ # Available to use for quota purposes for server-side applications. Can be any
1558
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1559
+ # Overrides userIp if both are provided.
1560
+ # @param [String] user_ip
1561
+ # IP address of the site where the request originates. Use this if you want to
1562
+ # enforce per-user limits.
1563
+ # @param [Google::Apis::RequestOptions] options
1564
+ # Request-specific options
1565
+ #
1566
+ # @yield [result, err] Result & error if block supplied
1567
+ # @yieldparam result [Google::Apis::YoutubeV3::ListI18nRegionsResponse] parsed result object
1568
+ # @yieldparam err [StandardError] error object if request failed
1569
+ #
1570
+ # @return [Google::Apis::YoutubeV3::ListI18nRegionsResponse]
1571
+ #
1572
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1573
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1574
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1575
+ def list_i18n_regions(hl: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1576
+ path = 'i18nRegions'
1577
+ command = make_simple_command(:get, path, options)
1578
+ command.response_representation = Google::Apis::YoutubeV3::ListI18nRegionsResponse::Representation
1579
+ command.response_class = Google::Apis::YoutubeV3::ListI18nRegionsResponse
1580
+ command.query['hl'] = hl unless hl.nil?
1581
+ command.query['part'] = part unless part.nil?
1582
+ command.query['fields'] = fields unless fields.nil?
1583
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1584
+ command.query['userIp'] = user_ip unless user_ip.nil?
1585
+ execute_or_queue_command(command, &block)
1586
+ end
1587
+
1588
+ # Binds a YouTube broadcast to a stream or removes an existing binding between a
1589
+ # broadcast and a stream. A broadcast can only be bound to one video stream,
1590
+ # though a video stream may be bound to more than one broadcast.
1591
+ # @param [String] id
1592
+ # The id parameter specifies the unique ID of the broadcast that is being bound
1593
+ # to a video stream.
1594
+ # @param [String] on_behalf_of_content_owner
1595
+ # Note: This parameter is intended exclusively for YouTube content partners.
1596
+ # The onBehalfOfContentOwner parameter indicates that the request's
1597
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
1598
+ # of the content owner specified in the parameter value. This parameter is
1599
+ # intended for YouTube content partners that own and manage many different
1600
+ # YouTube channels. It allows content owners to authenticate once and get access
1601
+ # to all their video and channel data, without having to provide authentication
1602
+ # credentials for each individual channel. The CMS account that the user
1603
+ # authenticates with must be linked to the specified YouTube content owner.
1604
+ # @param [String] on_behalf_of_content_owner_channel
1605
+ # This parameter can only be used in a properly authorized request. Note: This
1606
+ # parameter is intended exclusively for YouTube content partners.
1607
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
1608
+ # of the channel to which a video is being added. This parameter is required
1609
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
1610
+ # it can only be used in conjunction with that parameter. In addition, the
1611
+ # request must be authorized using a CMS account that is linked to the content
1612
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
1613
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
1614
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
1615
+ # specifies.
1616
+ # This parameter is intended for YouTube content partners that own and manage
1617
+ # many different YouTube channels. It allows content owners to authenticate once
1618
+ # and perform actions on behalf of the channel specified in the parameter value,
1619
+ # without having to provide authentication credentials for each separate channel.
1620
+ # @param [String] part
1621
+ # The part parameter specifies a comma-separated list of one or more
1622
+ # liveBroadcast resource properties that the API response will include. The part
1623
+ # names that you can include in the parameter value are id, snippet,
1624
+ # contentDetails, and status.
1625
+ # @param [String] stream_id
1626
+ # The streamId parameter specifies the unique ID of the video stream that is
1627
+ # being bound to a broadcast. If this parameter is omitted, the API will remove
1628
+ # any existing binding between the broadcast and a video stream.
1629
+ # @param [String] fields
1630
+ # Selector specifying which fields to include in a partial response.
1631
+ # @param [String] quota_user
1632
+ # Available to use for quota purposes for server-side applications. Can be any
1633
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1634
+ # Overrides userIp if both are provided.
1635
+ # @param [String] user_ip
1636
+ # IP address of the site where the request originates. Use this if you want to
1637
+ # enforce per-user limits.
1638
+ # @param [Google::Apis::RequestOptions] options
1639
+ # Request-specific options
1640
+ #
1641
+ # @yield [result, err] Result & error if block supplied
1642
+ # @yieldparam result [Google::Apis::YoutubeV3::LiveBroadcast] parsed result object
1643
+ # @yieldparam err [StandardError] error object if request failed
1644
+ #
1645
+ # @return [Google::Apis::YoutubeV3::LiveBroadcast]
1646
+ #
1647
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1648
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1649
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1650
+ def bind_live_broadcast(id: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, stream_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1651
+ path = 'liveBroadcasts/bind'
1652
+ command = make_simple_command(:post, path, options)
1653
+ command.response_representation = Google::Apis::YoutubeV3::LiveBroadcast::Representation
1654
+ command.response_class = Google::Apis::YoutubeV3::LiveBroadcast
1655
+ command.query['id'] = id unless id.nil?
1656
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1657
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
1658
+ command.query['part'] = part unless part.nil?
1659
+ command.query['streamId'] = stream_id unless stream_id.nil?
1660
+ command.query['fields'] = fields unless fields.nil?
1661
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1662
+ command.query['userIp'] = user_ip unless user_ip.nil?
1663
+ execute_or_queue_command(command, &block)
1664
+ end
1665
+
1666
+ # Controls the settings for a slate that can be displayed in the broadcast
1667
+ # stream.
1668
+ # @param [Boolean] display_slate
1669
+ # The displaySlate parameter specifies whether the slate is being enabled or
1670
+ # disabled.
1671
+ # @param [String] id
1672
+ # The id parameter specifies the YouTube live broadcast ID that uniquely
1673
+ # identifies the broadcast in which the slate is being updated.
1674
+ # @param [String] offset_time_ms
1675
+ # The offsetTimeMs parameter specifies a positive time offset when the specified
1676
+ # slate change will occur. The value is measured in milliseconds from the
1677
+ # beginning of the broadcast's monitor stream, which is the time that the
1678
+ # testing phase for the broadcast began. Even though it is specified in
1679
+ # milliseconds, the value is actually an approximation, and YouTube completes
1680
+ # the requested action as closely as possible to that time.
1681
+ # If you do not specify a value for this parameter, then YouTube performs the
1682
+ # action as soon as possible. See the Getting started guide for more details.
1683
+ # Important: You should only specify a value for this parameter if your
1684
+ # broadcast stream is delayed.
1685
+ # @param [String] on_behalf_of_content_owner
1686
+ # Note: This parameter is intended exclusively for YouTube content partners.
1687
+ # The onBehalfOfContentOwner parameter indicates that the request's
1688
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
1689
+ # of the content owner specified in the parameter value. This parameter is
1690
+ # intended for YouTube content partners that own and manage many different
1691
+ # YouTube channels. It allows content owners to authenticate once and get access
1692
+ # to all their video and channel data, without having to provide authentication
1693
+ # credentials for each individual channel. The CMS account that the user
1694
+ # authenticates with must be linked to the specified YouTube content owner.
1695
+ # @param [String] on_behalf_of_content_owner_channel
1696
+ # This parameter can only be used in a properly authorized request. Note: This
1697
+ # parameter is intended exclusively for YouTube content partners.
1698
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
1699
+ # of the channel to which a video is being added. This parameter is required
1700
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
1701
+ # it can only be used in conjunction with that parameter. In addition, the
1702
+ # request must be authorized using a CMS account that is linked to the content
1703
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
1704
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
1705
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
1706
+ # specifies.
1707
+ # This parameter is intended for YouTube content partners that own and manage
1708
+ # many different YouTube channels. It allows content owners to authenticate once
1709
+ # and perform actions on behalf of the channel specified in the parameter value,
1710
+ # without having to provide authentication credentials for each separate channel.
1711
+ # @param [String] part
1712
+ # The part parameter specifies a comma-separated list of one or more
1713
+ # liveBroadcast resource properties that the API response will include. The part
1714
+ # names that you can include in the parameter value are id, snippet,
1715
+ # contentDetails, and status.
1716
+ # @param [DateTime] walltime
1717
+ # The walltime parameter specifies the wall clock time at which the specified
1718
+ # slate change will occur. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:
1719
+ # ss.sssZ) format.
1720
+ # @param [String] fields
1721
+ # Selector specifying which fields to include in a partial response.
1722
+ # @param [String] quota_user
1723
+ # Available to use for quota purposes for server-side applications. Can be any
1724
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1725
+ # Overrides userIp if both are provided.
1726
+ # @param [String] user_ip
1727
+ # IP address of the site where the request originates. Use this if you want to
1728
+ # enforce per-user limits.
1729
+ # @param [Google::Apis::RequestOptions] options
1730
+ # Request-specific options
1731
+ #
1732
+ # @yield [result, err] Result & error if block supplied
1733
+ # @yieldparam result [Google::Apis::YoutubeV3::LiveBroadcast] parsed result object
1734
+ # @yieldparam err [StandardError] error object if request failed
1735
+ #
1736
+ # @return [Google::Apis::YoutubeV3::LiveBroadcast]
1737
+ #
1738
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1739
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1740
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1741
+ def control_live_broadcast(display_slate: nil, id: nil, offset_time_ms: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, walltime: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1742
+ path = 'liveBroadcasts/control'
1743
+ command = make_simple_command(:post, path, options)
1744
+ command.response_representation = Google::Apis::YoutubeV3::LiveBroadcast::Representation
1745
+ command.response_class = Google::Apis::YoutubeV3::LiveBroadcast
1746
+ command.query['displaySlate'] = display_slate unless display_slate.nil?
1747
+ command.query['id'] = id unless id.nil?
1748
+ command.query['offsetTimeMs'] = offset_time_ms unless offset_time_ms.nil?
1749
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1750
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
1751
+ command.query['part'] = part unless part.nil?
1752
+ command.query['walltime'] = walltime unless walltime.nil?
1753
+ command.query['fields'] = fields unless fields.nil?
1754
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1755
+ command.query['userIp'] = user_ip unless user_ip.nil?
1756
+ execute_or_queue_command(command, &block)
1757
+ end
1758
+
1759
+ # Deletes a broadcast.
1760
+ # @param [String] id
1761
+ # The id parameter specifies the YouTube live broadcast ID for the resource that
1762
+ # is being deleted.
1763
+ # @param [String] on_behalf_of_content_owner
1764
+ # Note: This parameter is intended exclusively for YouTube content partners.
1765
+ # The onBehalfOfContentOwner parameter indicates that the request's
1766
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
1767
+ # of the content owner specified in the parameter value. This parameter is
1768
+ # intended for YouTube content partners that own and manage many different
1769
+ # YouTube channels. It allows content owners to authenticate once and get access
1770
+ # to all their video and channel data, without having to provide authentication
1771
+ # credentials for each individual channel. The CMS account that the user
1772
+ # authenticates with must be linked to the specified YouTube content owner.
1773
+ # @param [String] on_behalf_of_content_owner_channel
1774
+ # This parameter can only be used in a properly authorized request. Note: This
1775
+ # parameter is intended exclusively for YouTube content partners.
1776
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
1777
+ # of the channel to which a video is being added. This parameter is required
1778
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
1779
+ # it can only be used in conjunction with that parameter. In addition, the
1780
+ # request must be authorized using a CMS account that is linked to the content
1781
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
1782
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
1783
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
1784
+ # specifies.
1785
+ # This parameter is intended for YouTube content partners that own and manage
1786
+ # many different YouTube channels. It allows content owners to authenticate once
1787
+ # and perform actions on behalf of the channel specified in the parameter value,
1788
+ # without having to provide authentication credentials for each separate channel.
1789
+ # @param [String] fields
1790
+ # Selector specifying which fields to include in a partial response.
1791
+ # @param [String] quota_user
1792
+ # Available to use for quota purposes for server-side applications. Can be any
1793
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1794
+ # Overrides userIp if both are provided.
1795
+ # @param [String] user_ip
1796
+ # IP address of the site where the request originates. Use this if you want to
1797
+ # enforce per-user limits.
1798
+ # @param [Google::Apis::RequestOptions] options
1799
+ # Request-specific options
1800
+ #
1801
+ # @yield [result, err] Result & error if block supplied
1802
+ # @yieldparam result [NilClass] No result returned for this method
1803
+ # @yieldparam err [StandardError] error object if request failed
1804
+ #
1805
+ # @return [void]
1806
+ #
1807
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1808
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1809
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1810
+ def delete_live_broadcast(id: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1811
+ path = 'liveBroadcasts'
1812
+ command = make_simple_command(:delete, path, options)
1813
+ command.query['id'] = id unless id.nil?
1814
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1815
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
1816
+ command.query['fields'] = fields unless fields.nil?
1817
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1818
+ command.query['userIp'] = user_ip unless user_ip.nil?
1819
+ execute_or_queue_command(command, &block)
1820
+ end
1821
+
1822
+ # Creates a broadcast.
1823
+ # @param [Google::Apis::YoutubeV3::LiveBroadcast] live_broadcast_object
1824
+ # @param [String] on_behalf_of_content_owner
1825
+ # Note: This parameter is intended exclusively for YouTube content partners.
1826
+ # The onBehalfOfContentOwner parameter indicates that the request's
1827
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
1828
+ # of the content owner specified in the parameter value. This parameter is
1829
+ # intended for YouTube content partners that own and manage many different
1830
+ # YouTube channels. It allows content owners to authenticate once and get access
1831
+ # to all their video and channel data, without having to provide authentication
1832
+ # credentials for each individual channel. The CMS account that the user
1833
+ # authenticates with must be linked to the specified YouTube content owner.
1834
+ # @param [String] on_behalf_of_content_owner_channel
1835
+ # This parameter can only be used in a properly authorized request. Note: This
1836
+ # parameter is intended exclusively for YouTube content partners.
1837
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
1838
+ # of the channel to which a video is being added. This parameter is required
1839
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
1840
+ # it can only be used in conjunction with that parameter. In addition, the
1841
+ # request must be authorized using a CMS account that is linked to the content
1842
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
1843
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
1844
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
1845
+ # specifies.
1846
+ # This parameter is intended for YouTube content partners that own and manage
1847
+ # many different YouTube channels. It allows content owners to authenticate once
1848
+ # and perform actions on behalf of the channel specified in the parameter value,
1849
+ # without having to provide authentication credentials for each separate channel.
1850
+ # @param [String] part
1851
+ # The part parameter serves two purposes in this operation. It identifies the
1852
+ # properties that the write operation will set as well as the properties that
1853
+ # the API response will include.
1854
+ # The part properties that you can include in the parameter value are id,
1855
+ # snippet, contentDetails, and status.
1856
+ # @param [String] fields
1857
+ # Selector specifying which fields to include in a partial response.
1858
+ # @param [String] quota_user
1859
+ # Available to use for quota purposes for server-side applications. Can be any
1860
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1861
+ # Overrides userIp if both are provided.
1862
+ # @param [String] user_ip
1863
+ # IP address of the site where the request originates. Use this if you want to
1864
+ # enforce per-user limits.
1865
+ # @param [Google::Apis::RequestOptions] options
1866
+ # Request-specific options
1867
+ #
1868
+ # @yield [result, err] Result & error if block supplied
1869
+ # @yieldparam result [Google::Apis::YoutubeV3::LiveBroadcast] parsed result object
1870
+ # @yieldparam err [StandardError] error object if request failed
1871
+ #
1872
+ # @return [Google::Apis::YoutubeV3::LiveBroadcast]
1873
+ #
1874
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1875
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1876
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1877
+ def insert_live_broadcast(live_broadcast_object = nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1878
+ path = 'liveBroadcasts'
1879
+ command = make_simple_command(:post, path, options)
1880
+ command.request_representation = Google::Apis::YoutubeV3::LiveBroadcast::Representation
1881
+ command.request_object = live_broadcast_object
1882
+ command.response_representation = Google::Apis::YoutubeV3::LiveBroadcast::Representation
1883
+ command.response_class = Google::Apis::YoutubeV3::LiveBroadcast
1884
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1885
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
1886
+ command.query['part'] = part unless part.nil?
1887
+ command.query['fields'] = fields unless fields.nil?
1888
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1889
+ command.query['userIp'] = user_ip unless user_ip.nil?
1890
+ execute_or_queue_command(command, &block)
1891
+ end
1892
+
1893
+ # Returns a list of YouTube broadcasts that match the API request parameters.
1894
+ # @param [String] broadcast_status
1895
+ # The broadcastStatus parameter filters the API response to only include
1896
+ # broadcasts with the specified status.
1897
+ # @param [String] id
1898
+ # The id parameter specifies a comma-separated list of YouTube broadcast IDs
1899
+ # that identify the broadcasts being retrieved. In a liveBroadcast resource, the
1900
+ # id property specifies the broadcast's ID.
1901
+ # @param [Fixnum] max_results
1902
+ # The maxResults parameter specifies the maximum number of items that should be
1903
+ # returned in the result set.
1904
+ # @param [Boolean] mine
1905
+ # The mine parameter can be used to instruct the API to only return broadcasts
1906
+ # owned by the authenticated user. Set the parameter value to true to only
1907
+ # retrieve your own broadcasts.
1908
+ # @param [String] on_behalf_of_content_owner
1909
+ # Note: This parameter is intended exclusively for YouTube content partners.
1910
+ # The onBehalfOfContentOwner parameter indicates that the request's
1911
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
1912
+ # of the content owner specified in the parameter value. This parameter is
1913
+ # intended for YouTube content partners that own and manage many different
1914
+ # YouTube channels. It allows content owners to authenticate once and get access
1915
+ # to all their video and channel data, without having to provide authentication
1916
+ # credentials for each individual channel. The CMS account that the user
1917
+ # authenticates with must be linked to the specified YouTube content owner.
1918
+ # @param [String] on_behalf_of_content_owner_channel
1919
+ # This parameter can only be used in a properly authorized request. Note: This
1920
+ # parameter is intended exclusively for YouTube content partners.
1921
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
1922
+ # of the channel to which a video is being added. This parameter is required
1923
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
1924
+ # it can only be used in conjunction with that parameter. In addition, the
1925
+ # request must be authorized using a CMS account that is linked to the content
1926
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
1927
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
1928
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
1929
+ # specifies.
1930
+ # This parameter is intended for YouTube content partners that own and manage
1931
+ # many different YouTube channels. It allows content owners to authenticate once
1932
+ # and perform actions on behalf of the channel specified in the parameter value,
1933
+ # without having to provide authentication credentials for each separate channel.
1934
+ # @param [String] page_token
1935
+ # The pageToken parameter identifies a specific page in the result set that
1936
+ # should be returned. In an API response, the nextPageToken and prevPageToken
1937
+ # properties identify other pages that could be retrieved.
1938
+ # @param [String] part
1939
+ # The part parameter specifies a comma-separated list of one or more
1940
+ # liveBroadcast resource properties that the API response will include. The part
1941
+ # names that you can include in the parameter value are id, snippet,
1942
+ # contentDetails, and status.
1943
+ # @param [String] fields
1944
+ # Selector specifying which fields to include in a partial response.
1945
+ # @param [String] quota_user
1946
+ # Available to use for quota purposes for server-side applications. Can be any
1947
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1948
+ # Overrides userIp if both are provided.
1949
+ # @param [String] user_ip
1950
+ # IP address of the site where the request originates. Use this if you want to
1951
+ # enforce per-user limits.
1952
+ # @param [Google::Apis::RequestOptions] options
1953
+ # Request-specific options
1954
+ #
1955
+ # @yield [result, err] Result & error if block supplied
1956
+ # @yieldparam result [Google::Apis::YoutubeV3::ListLiveBroadcastsResponse] parsed result object
1957
+ # @yieldparam err [StandardError] error object if request failed
1958
+ #
1959
+ # @return [Google::Apis::YoutubeV3::ListLiveBroadcastsResponse]
1960
+ #
1961
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1962
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1963
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1964
+ def list_live_broadcasts(broadcast_status: nil, id: nil, max_results: nil, mine: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, page_token: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1965
+ path = 'liveBroadcasts'
1966
+ command = make_simple_command(:get, path, options)
1967
+ command.response_representation = Google::Apis::YoutubeV3::ListLiveBroadcastsResponse::Representation
1968
+ command.response_class = Google::Apis::YoutubeV3::ListLiveBroadcastsResponse
1969
+ command.query['broadcastStatus'] = broadcast_status unless broadcast_status.nil?
1970
+ command.query['id'] = id unless id.nil?
1971
+ command.query['maxResults'] = max_results unless max_results.nil?
1972
+ command.query['mine'] = mine unless mine.nil?
1973
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1974
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
1975
+ command.query['pageToken'] = page_token unless page_token.nil?
1976
+ command.query['part'] = part unless part.nil?
1977
+ command.query['fields'] = fields unless fields.nil?
1978
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1979
+ command.query['userIp'] = user_ip unless user_ip.nil?
1980
+ execute_or_queue_command(command, &block)
1981
+ end
1982
+
1983
+ # Changes the status of a YouTube live broadcast and initiates any processes
1984
+ # associated with the new status. For example, when you transition a broadcast's
1985
+ # status to testing, YouTube starts to transmit video to that broadcast's
1986
+ # monitor stream. Before calling this method, you should confirm that the value
1987
+ # of the status.streamStatus property for the stream bound to your broadcast is
1988
+ # active.
1989
+ # @param [String] broadcast_status
1990
+ # The broadcastStatus parameter identifies the state to which the broadcast is
1991
+ # changing. Note that to transition a broadcast to either the testing or live
1992
+ # state, the status.streamStatus must be active for the stream that the
1993
+ # broadcast is bound to.
1994
+ # @param [String] id
1995
+ # The id parameter specifies the unique ID of the broadcast that is
1996
+ # transitioning to another status.
1997
+ # @param [String] on_behalf_of_content_owner
1998
+ # Note: This parameter is intended exclusively for YouTube content partners.
1999
+ # The onBehalfOfContentOwner parameter indicates that the request's
2000
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2001
+ # of the content owner specified in the parameter value. This parameter is
2002
+ # intended for YouTube content partners that own and manage many different
2003
+ # YouTube channels. It allows content owners to authenticate once and get access
2004
+ # to all their video and channel data, without having to provide authentication
2005
+ # credentials for each individual channel. The CMS account that the user
2006
+ # authenticates with must be linked to the specified YouTube content owner.
2007
+ # @param [String] on_behalf_of_content_owner_channel
2008
+ # This parameter can only be used in a properly authorized request. Note: This
2009
+ # parameter is intended exclusively for YouTube content partners.
2010
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
2011
+ # of the channel to which a video is being added. This parameter is required
2012
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
2013
+ # it can only be used in conjunction with that parameter. In addition, the
2014
+ # request must be authorized using a CMS account that is linked to the content
2015
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
2016
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
2017
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
2018
+ # specifies.
2019
+ # This parameter is intended for YouTube content partners that own and manage
2020
+ # many different YouTube channels. It allows content owners to authenticate once
2021
+ # and perform actions on behalf of the channel specified in the parameter value,
2022
+ # without having to provide authentication credentials for each separate channel.
2023
+ # @param [String] part
2024
+ # The part parameter specifies a comma-separated list of one or more
2025
+ # liveBroadcast resource properties that the API response will include. The part
2026
+ # names that you can include in the parameter value are id, snippet,
2027
+ # contentDetails, and status.
2028
+ # @param [String] fields
2029
+ # Selector specifying which fields to include in a partial response.
2030
+ # @param [String] quota_user
2031
+ # Available to use for quota purposes for server-side applications. Can be any
2032
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2033
+ # Overrides userIp if both are provided.
2034
+ # @param [String] user_ip
2035
+ # IP address of the site where the request originates. Use this if you want to
2036
+ # enforce per-user limits.
2037
+ # @param [Google::Apis::RequestOptions] options
2038
+ # Request-specific options
2039
+ #
2040
+ # @yield [result, err] Result & error if block supplied
2041
+ # @yieldparam result [Google::Apis::YoutubeV3::LiveBroadcast] parsed result object
2042
+ # @yieldparam err [StandardError] error object if request failed
2043
+ #
2044
+ # @return [Google::Apis::YoutubeV3::LiveBroadcast]
2045
+ #
2046
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2047
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2048
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2049
+ def transition_live_broadcast(broadcast_status: nil, id: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2050
+ path = 'liveBroadcasts/transition'
2051
+ command = make_simple_command(:post, path, options)
2052
+ command.response_representation = Google::Apis::YoutubeV3::LiveBroadcast::Representation
2053
+ command.response_class = Google::Apis::YoutubeV3::LiveBroadcast
2054
+ command.query['broadcastStatus'] = broadcast_status unless broadcast_status.nil?
2055
+ command.query['id'] = id unless id.nil?
2056
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2057
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
2058
+ command.query['part'] = part unless part.nil?
2059
+ command.query['fields'] = fields unless fields.nil?
2060
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2061
+ command.query['userIp'] = user_ip unless user_ip.nil?
2062
+ execute_or_queue_command(command, &block)
2063
+ end
2064
+
2065
+ # Updates a broadcast. For example, you could modify the broadcast settings
2066
+ # defined in the liveBroadcast resource's contentDetails object.
2067
+ # @param [Google::Apis::YoutubeV3::LiveBroadcast] live_broadcast_object
2068
+ # @param [String] on_behalf_of_content_owner
2069
+ # Note: This parameter is intended exclusively for YouTube content partners.
2070
+ # The onBehalfOfContentOwner parameter indicates that the request's
2071
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2072
+ # of the content owner specified in the parameter value. This parameter is
2073
+ # intended for YouTube content partners that own and manage many different
2074
+ # YouTube channels. It allows content owners to authenticate once and get access
2075
+ # to all their video and channel data, without having to provide authentication
2076
+ # credentials for each individual channel. The CMS account that the user
2077
+ # authenticates with must be linked to the specified YouTube content owner.
2078
+ # @param [String] on_behalf_of_content_owner_channel
2079
+ # This parameter can only be used in a properly authorized request. Note: This
2080
+ # parameter is intended exclusively for YouTube content partners.
2081
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
2082
+ # of the channel to which a video is being added. This parameter is required
2083
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
2084
+ # it can only be used in conjunction with that parameter. In addition, the
2085
+ # request must be authorized using a CMS account that is linked to the content
2086
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
2087
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
2088
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
2089
+ # specifies.
2090
+ # This parameter is intended for YouTube content partners that own and manage
2091
+ # many different YouTube channels. It allows content owners to authenticate once
2092
+ # and perform actions on behalf of the channel specified in the parameter value,
2093
+ # without having to provide authentication credentials for each separate channel.
2094
+ # @param [String] part
2095
+ # The part parameter serves two purposes in this operation. It identifies the
2096
+ # properties that the write operation will set as well as the properties that
2097
+ # the API response will include.
2098
+ # The part properties that you can include in the parameter value are id,
2099
+ # snippet, contentDetails, and status.
2100
+ # Note that this method will override the existing values for all of the mutable
2101
+ # properties that are contained in any parts that the parameter value specifies.
2102
+ # For example, a broadcast's privacy status is defined in the status part. As
2103
+ # such, if your request is updating a private or unlisted broadcast, and the
2104
+ # request's part parameter value includes the status part, the broadcast's
2105
+ # privacy setting will be updated to whatever value the request body specifies.
2106
+ # If the request body does not specify a value, the existing privacy setting
2107
+ # will be removed and the broadcast will revert to the default privacy setting.
2108
+ # @param [String] fields
2109
+ # Selector specifying which fields to include in a partial response.
2110
+ # @param [String] quota_user
2111
+ # Available to use for quota purposes for server-side applications. Can be any
2112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2113
+ # Overrides userIp if both are provided.
2114
+ # @param [String] user_ip
2115
+ # IP address of the site where the request originates. Use this if you want to
2116
+ # enforce per-user limits.
2117
+ # @param [Google::Apis::RequestOptions] options
2118
+ # Request-specific options
2119
+ #
2120
+ # @yield [result, err] Result & error if block supplied
2121
+ # @yieldparam result [Google::Apis::YoutubeV3::LiveBroadcast] parsed result object
2122
+ # @yieldparam err [StandardError] error object if request failed
2123
+ #
2124
+ # @return [Google::Apis::YoutubeV3::LiveBroadcast]
2125
+ #
2126
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2127
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2128
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2129
+ def update_live_broadcast(live_broadcast_object = nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2130
+ path = 'liveBroadcasts'
2131
+ command = make_simple_command(:put, path, options)
2132
+ command.request_representation = Google::Apis::YoutubeV3::LiveBroadcast::Representation
2133
+ command.request_object = live_broadcast_object
2134
+ command.response_representation = Google::Apis::YoutubeV3::LiveBroadcast::Representation
2135
+ command.response_class = Google::Apis::YoutubeV3::LiveBroadcast
2136
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2137
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
2138
+ command.query['part'] = part unless part.nil?
2139
+ command.query['fields'] = fields unless fields.nil?
2140
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2141
+ command.query['userIp'] = user_ip unless user_ip.nil?
2142
+ execute_or_queue_command(command, &block)
2143
+ end
2144
+
2145
+ # Deletes a video stream.
2146
+ # @param [String] id
2147
+ # The id parameter specifies the YouTube live stream ID for the resource that is
2148
+ # being deleted.
2149
+ # @param [String] on_behalf_of_content_owner
2150
+ # Note: This parameter is intended exclusively for YouTube content partners.
2151
+ # The onBehalfOfContentOwner parameter indicates that the request's
2152
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2153
+ # of the content owner specified in the parameter value. This parameter is
2154
+ # intended for YouTube content partners that own and manage many different
2155
+ # YouTube channels. It allows content owners to authenticate once and get access
2156
+ # to all their video and channel data, without having to provide authentication
2157
+ # credentials for each individual channel. The CMS account that the user
2158
+ # authenticates with must be linked to the specified YouTube content owner.
2159
+ # @param [String] on_behalf_of_content_owner_channel
2160
+ # This parameter can only be used in a properly authorized request. Note: This
2161
+ # parameter is intended exclusively for YouTube content partners.
2162
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
2163
+ # of the channel to which a video is being added. This parameter is required
2164
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
2165
+ # it can only be used in conjunction with that parameter. In addition, the
2166
+ # request must be authorized using a CMS account that is linked to the content
2167
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
2168
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
2169
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
2170
+ # specifies.
2171
+ # This parameter is intended for YouTube content partners that own and manage
2172
+ # many different YouTube channels. It allows content owners to authenticate once
2173
+ # and perform actions on behalf of the channel specified in the parameter value,
2174
+ # without having to provide authentication credentials for each separate channel.
2175
+ # @param [String] fields
2176
+ # Selector specifying which fields to include in a partial response.
2177
+ # @param [String] quota_user
2178
+ # Available to use for quota purposes for server-side applications. Can be any
2179
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2180
+ # Overrides userIp if both are provided.
2181
+ # @param [String] user_ip
2182
+ # IP address of the site where the request originates. Use this if you want to
2183
+ # enforce per-user limits.
2184
+ # @param [Google::Apis::RequestOptions] options
2185
+ # Request-specific options
2186
+ #
2187
+ # @yield [result, err] Result & error if block supplied
2188
+ # @yieldparam result [NilClass] No result returned for this method
2189
+ # @yieldparam err [StandardError] error object if request failed
2190
+ #
2191
+ # @return [void]
2192
+ #
2193
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2194
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2195
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2196
+ def delete_live_stream(id: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2197
+ path = 'liveStreams'
2198
+ command = make_simple_command(:delete, path, options)
2199
+ command.query['id'] = id unless id.nil?
2200
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2201
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
2202
+ command.query['fields'] = fields unless fields.nil?
2203
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2204
+ command.query['userIp'] = user_ip unless user_ip.nil?
2205
+ execute_or_queue_command(command, &block)
2206
+ end
2207
+
2208
+ # Creates a video stream. The stream enables you to send your video to YouTube,
2209
+ # which can then broadcast the video to your audience.
2210
+ # @param [Google::Apis::YoutubeV3::LiveStream] live_stream_object
2211
+ # @param [String] on_behalf_of_content_owner
2212
+ # Note: This parameter is intended exclusively for YouTube content partners.
2213
+ # The onBehalfOfContentOwner parameter indicates that the request's
2214
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2215
+ # of the content owner specified in the parameter value. This parameter is
2216
+ # intended for YouTube content partners that own and manage many different
2217
+ # YouTube channels. It allows content owners to authenticate once and get access
2218
+ # to all their video and channel data, without having to provide authentication
2219
+ # credentials for each individual channel. The CMS account that the user
2220
+ # authenticates with must be linked to the specified YouTube content owner.
2221
+ # @param [String] on_behalf_of_content_owner_channel
2222
+ # This parameter can only be used in a properly authorized request. Note: This
2223
+ # parameter is intended exclusively for YouTube content partners.
2224
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
2225
+ # of the channel to which a video is being added. This parameter is required
2226
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
2227
+ # it can only be used in conjunction with that parameter. In addition, the
2228
+ # request must be authorized using a CMS account that is linked to the content
2229
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
2230
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
2231
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
2232
+ # specifies.
2233
+ # This parameter is intended for YouTube content partners that own and manage
2234
+ # many different YouTube channels. It allows content owners to authenticate once
2235
+ # and perform actions on behalf of the channel specified in the parameter value,
2236
+ # without having to provide authentication credentials for each separate channel.
2237
+ # @param [String] part
2238
+ # The part parameter serves two purposes in this operation. It identifies the
2239
+ # properties that the write operation will set as well as the properties that
2240
+ # the API response will include.
2241
+ # The part properties that you can include in the parameter value are id,
2242
+ # snippet, cdn, and status.
2243
+ # @param [String] fields
2244
+ # Selector specifying which fields to include in a partial response.
2245
+ # @param [String] quota_user
2246
+ # Available to use for quota purposes for server-side applications. Can be any
2247
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2248
+ # Overrides userIp if both are provided.
2249
+ # @param [String] user_ip
2250
+ # IP address of the site where the request originates. Use this if you want to
2251
+ # enforce per-user limits.
2252
+ # @param [Google::Apis::RequestOptions] options
2253
+ # Request-specific options
2254
+ #
2255
+ # @yield [result, err] Result & error if block supplied
2256
+ # @yieldparam result [Google::Apis::YoutubeV3::LiveStream] parsed result object
2257
+ # @yieldparam err [StandardError] error object if request failed
2258
+ #
2259
+ # @return [Google::Apis::YoutubeV3::LiveStream]
2260
+ #
2261
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2262
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2263
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2264
+ def insert_live_stream(live_stream_object = nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2265
+ path = 'liveStreams'
2266
+ command = make_simple_command(:post, path, options)
2267
+ command.request_representation = Google::Apis::YoutubeV3::LiveStream::Representation
2268
+ command.request_object = live_stream_object
2269
+ command.response_representation = Google::Apis::YoutubeV3::LiveStream::Representation
2270
+ command.response_class = Google::Apis::YoutubeV3::LiveStream
2271
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2272
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
2273
+ command.query['part'] = part unless part.nil?
2274
+ command.query['fields'] = fields unless fields.nil?
2275
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2276
+ command.query['userIp'] = user_ip unless user_ip.nil?
2277
+ execute_or_queue_command(command, &block)
2278
+ end
2279
+
2280
+ # Returns a list of video streams that match the API request parameters.
2281
+ # @param [String] id
2282
+ # The id parameter specifies a comma-separated list of YouTube stream IDs that
2283
+ # identify the streams being retrieved. In a liveStream resource, the id
2284
+ # property specifies the stream's ID.
2285
+ # @param [Fixnum] max_results
2286
+ # The maxResults parameter specifies the maximum number of items that should be
2287
+ # returned in the result set.
2288
+ # @param [Boolean] mine
2289
+ # The mine parameter can be used to instruct the API to only return streams
2290
+ # owned by the authenticated user. Set the parameter value to true to only
2291
+ # retrieve your own streams.
2292
+ # @param [String] on_behalf_of_content_owner
2293
+ # Note: This parameter is intended exclusively for YouTube content partners.
2294
+ # The onBehalfOfContentOwner parameter indicates that the request's
2295
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2296
+ # of the content owner specified in the parameter value. This parameter is
2297
+ # intended for YouTube content partners that own and manage many different
2298
+ # YouTube channels. It allows content owners to authenticate once and get access
2299
+ # to all their video and channel data, without having to provide authentication
2300
+ # credentials for each individual channel. The CMS account that the user
2301
+ # authenticates with must be linked to the specified YouTube content owner.
2302
+ # @param [String] on_behalf_of_content_owner_channel
2303
+ # This parameter can only be used in a properly authorized request. Note: This
2304
+ # parameter is intended exclusively for YouTube content partners.
2305
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
2306
+ # of the channel to which a video is being added. This parameter is required
2307
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
2308
+ # it can only be used in conjunction with that parameter. In addition, the
2309
+ # request must be authorized using a CMS account that is linked to the content
2310
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
2311
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
2312
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
2313
+ # specifies.
2314
+ # This parameter is intended for YouTube content partners that own and manage
2315
+ # many different YouTube channels. It allows content owners to authenticate once
2316
+ # and perform actions on behalf of the channel specified in the parameter value,
2317
+ # without having to provide authentication credentials for each separate channel.
2318
+ # @param [String] page_token
2319
+ # The pageToken parameter identifies a specific page in the result set that
2320
+ # should be returned. In an API response, the nextPageToken and prevPageToken
2321
+ # properties identify other pages that could be retrieved.
2322
+ # @param [String] part
2323
+ # The part parameter specifies a comma-separated list of one or more liveStream
2324
+ # resource properties that the API response will include. The part names that
2325
+ # you can include in the parameter value are id, snippet, cdn, and status.
2326
+ # @param [String] fields
2327
+ # Selector specifying which fields to include in a partial response.
2328
+ # @param [String] quota_user
2329
+ # Available to use for quota purposes for server-side applications. Can be any
2330
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2331
+ # Overrides userIp if both are provided.
2332
+ # @param [String] user_ip
2333
+ # IP address of the site where the request originates. Use this if you want to
2334
+ # enforce per-user limits.
2335
+ # @param [Google::Apis::RequestOptions] options
2336
+ # Request-specific options
2337
+ #
2338
+ # @yield [result, err] Result & error if block supplied
2339
+ # @yieldparam result [Google::Apis::YoutubeV3::ListLiveStreamsResponse] parsed result object
2340
+ # @yieldparam err [StandardError] error object if request failed
2341
+ #
2342
+ # @return [Google::Apis::YoutubeV3::ListLiveStreamsResponse]
2343
+ #
2344
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2345
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2346
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2347
+ def list_live_streams(id: nil, max_results: nil, mine: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, page_token: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2348
+ path = 'liveStreams'
2349
+ command = make_simple_command(:get, path, options)
2350
+ command.response_representation = Google::Apis::YoutubeV3::ListLiveStreamsResponse::Representation
2351
+ command.response_class = Google::Apis::YoutubeV3::ListLiveStreamsResponse
2352
+ command.query['id'] = id unless id.nil?
2353
+ command.query['maxResults'] = max_results unless max_results.nil?
2354
+ command.query['mine'] = mine unless mine.nil?
2355
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2356
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
2357
+ command.query['pageToken'] = page_token unless page_token.nil?
2358
+ command.query['part'] = part unless part.nil?
2359
+ command.query['fields'] = fields unless fields.nil?
2360
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2361
+ command.query['userIp'] = user_ip unless user_ip.nil?
2362
+ execute_or_queue_command(command, &block)
2363
+ end
2364
+
2365
+ # Updates a video stream. If the properties that you want to change cannot be
2366
+ # updated, then you need to create a new stream with the proper settings.
2367
+ # @param [Google::Apis::YoutubeV3::LiveStream] live_stream_object
2368
+ # @param [String] on_behalf_of_content_owner
2369
+ # Note: This parameter is intended exclusively for YouTube content partners.
2370
+ # The onBehalfOfContentOwner parameter indicates that the request's
2371
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2372
+ # of the content owner specified in the parameter value. This parameter is
2373
+ # intended for YouTube content partners that own and manage many different
2374
+ # YouTube channels. It allows content owners to authenticate once and get access
2375
+ # to all their video and channel data, without having to provide authentication
2376
+ # credentials for each individual channel. The CMS account that the user
2377
+ # authenticates with must be linked to the specified YouTube content owner.
2378
+ # @param [String] on_behalf_of_content_owner_channel
2379
+ # This parameter can only be used in a properly authorized request. Note: This
2380
+ # parameter is intended exclusively for YouTube content partners.
2381
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
2382
+ # of the channel to which a video is being added. This parameter is required
2383
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
2384
+ # it can only be used in conjunction with that parameter. In addition, the
2385
+ # request must be authorized using a CMS account that is linked to the content
2386
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
2387
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
2388
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
2389
+ # specifies.
2390
+ # This parameter is intended for YouTube content partners that own and manage
2391
+ # many different YouTube channels. It allows content owners to authenticate once
2392
+ # and perform actions on behalf of the channel specified in the parameter value,
2393
+ # without having to provide authentication credentials for each separate channel.
2394
+ # @param [String] part
2395
+ # The part parameter serves two purposes in this operation. It identifies the
2396
+ # properties that the write operation will set as well as the properties that
2397
+ # the API response will include.
2398
+ # The part properties that you can include in the parameter value are id,
2399
+ # snippet, cdn, and status.
2400
+ # Note that this method will override the existing values for all of the mutable
2401
+ # properties that are contained in any parts that the parameter value specifies.
2402
+ # If the request body does not specify a value for a mutable property, the
2403
+ # existing value for that property will be removed.
2404
+ # @param [String] fields
2405
+ # Selector specifying which fields to include in a partial response.
2406
+ # @param [String] quota_user
2407
+ # Available to use for quota purposes for server-side applications. Can be any
2408
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2409
+ # Overrides userIp if both are provided.
2410
+ # @param [String] user_ip
2411
+ # IP address of the site where the request originates. Use this if you want to
2412
+ # enforce per-user limits.
2413
+ # @param [Google::Apis::RequestOptions] options
2414
+ # Request-specific options
2415
+ #
2416
+ # @yield [result, err] Result & error if block supplied
2417
+ # @yieldparam result [Google::Apis::YoutubeV3::LiveStream] parsed result object
2418
+ # @yieldparam err [StandardError] error object if request failed
2419
+ #
2420
+ # @return [Google::Apis::YoutubeV3::LiveStream]
2421
+ #
2422
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2423
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2424
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2425
+ def update_live_stream(live_stream_object = nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2426
+ path = 'liveStreams'
2427
+ command = make_simple_command(:put, path, options)
2428
+ command.request_representation = Google::Apis::YoutubeV3::LiveStream::Representation
2429
+ command.request_object = live_stream_object
2430
+ command.response_representation = Google::Apis::YoutubeV3::LiveStream::Representation
2431
+ command.response_class = Google::Apis::YoutubeV3::LiveStream
2432
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2433
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
2434
+ command.query['part'] = part unless part.nil?
2435
+ command.query['fields'] = fields unless fields.nil?
2436
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2437
+ command.query['userIp'] = user_ip unless user_ip.nil?
2438
+ execute_or_queue_command(command, &block)
2439
+ end
2440
+
2441
+ # Deletes a playlist item.
2442
+ # @param [String] id
2443
+ # The id parameter specifies the YouTube playlist item ID for the playlist item
2444
+ # that is being deleted. In a playlistItem resource, the id property specifies
2445
+ # the playlist item's ID.
2446
+ # @param [String] fields
2447
+ # Selector specifying which fields to include in a partial response.
2448
+ # @param [String] quota_user
2449
+ # Available to use for quota purposes for server-side applications. Can be any
2450
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2451
+ # Overrides userIp if both are provided.
2452
+ # @param [String] user_ip
2453
+ # IP address of the site where the request originates. Use this if you want to
2454
+ # enforce per-user limits.
2455
+ # @param [Google::Apis::RequestOptions] options
2456
+ # Request-specific options
2457
+ #
2458
+ # @yield [result, err] Result & error if block supplied
2459
+ # @yieldparam result [NilClass] No result returned for this method
2460
+ # @yieldparam err [StandardError] error object if request failed
2461
+ #
2462
+ # @return [void]
2463
+ #
2464
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2465
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2466
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2467
+ def delete_playlist_item(id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2468
+ path = 'playlistItems'
2469
+ command = make_simple_command(:delete, path, options)
2470
+ command.query['id'] = id unless id.nil?
2471
+ command.query['fields'] = fields unless fields.nil?
2472
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2473
+ command.query['userIp'] = user_ip unless user_ip.nil?
2474
+ execute_or_queue_command(command, &block)
2475
+ end
2476
+
2477
+ # Adds a resource to a playlist.
2478
+ # @param [Google::Apis::YoutubeV3::PlaylistItem] playlist_item_object
2479
+ # @param [String] on_behalf_of_content_owner
2480
+ # Note: This parameter is intended exclusively for YouTube content partners.
2481
+ # The onBehalfOfContentOwner parameter indicates that the request's
2482
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2483
+ # of the content owner specified in the parameter value. This parameter is
2484
+ # intended for YouTube content partners that own and manage many different
2485
+ # YouTube channels. It allows content owners to authenticate once and get access
2486
+ # to all their video and channel data, without having to provide authentication
2487
+ # credentials for each individual channel. The CMS account that the user
2488
+ # authenticates with must be linked to the specified YouTube content owner.
2489
+ # @param [String] part
2490
+ # The part parameter serves two purposes in this operation. It identifies the
2491
+ # properties that the write operation will set as well as the properties that
2492
+ # the API response will include.
2493
+ # @param [String] fields
2494
+ # Selector specifying which fields to include in a partial response.
2495
+ # @param [String] quota_user
2496
+ # Available to use for quota purposes for server-side applications. Can be any
2497
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2498
+ # Overrides userIp if both are provided.
2499
+ # @param [String] user_ip
2500
+ # IP address of the site where the request originates. Use this if you want to
2501
+ # enforce per-user limits.
2502
+ # @param [Google::Apis::RequestOptions] options
2503
+ # Request-specific options
2504
+ #
2505
+ # @yield [result, err] Result & error if block supplied
2506
+ # @yieldparam result [Google::Apis::YoutubeV3::PlaylistItem] parsed result object
2507
+ # @yieldparam err [StandardError] error object if request failed
2508
+ #
2509
+ # @return [Google::Apis::YoutubeV3::PlaylistItem]
2510
+ #
2511
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2512
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2513
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2514
+ def insert_playlist_item(playlist_item_object = nil, on_behalf_of_content_owner: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2515
+ path = 'playlistItems'
2516
+ command = make_simple_command(:post, path, options)
2517
+ command.request_representation = Google::Apis::YoutubeV3::PlaylistItem::Representation
2518
+ command.request_object = playlist_item_object
2519
+ command.response_representation = Google::Apis::YoutubeV3::PlaylistItem::Representation
2520
+ command.response_class = Google::Apis::YoutubeV3::PlaylistItem
2521
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2522
+ command.query['part'] = part unless part.nil?
2523
+ command.query['fields'] = fields unless fields.nil?
2524
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2525
+ command.query['userIp'] = user_ip unless user_ip.nil?
2526
+ execute_or_queue_command(command, &block)
2527
+ end
2528
+
2529
+ # Returns a collection of playlist items that match the API request parameters.
2530
+ # You can retrieve all of the playlist items in a specified playlist or retrieve
2531
+ # one or more playlist items by their unique IDs.
2532
+ # @param [String] id
2533
+ # The id parameter specifies a comma-separated list of one or more unique
2534
+ # playlist item IDs.
2535
+ # @param [Fixnum] max_results
2536
+ # The maxResults parameter specifies the maximum number of items that should be
2537
+ # returned in the result set.
2538
+ # @param [String] on_behalf_of_content_owner
2539
+ # Note: This parameter is intended exclusively for YouTube content partners.
2540
+ # The onBehalfOfContentOwner parameter indicates that the request's
2541
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2542
+ # of the content owner specified in the parameter value. This parameter is
2543
+ # intended for YouTube content partners that own and manage many different
2544
+ # YouTube channels. It allows content owners to authenticate once and get access
2545
+ # to all their video and channel data, without having to provide authentication
2546
+ # credentials for each individual channel. The CMS account that the user
2547
+ # authenticates with must be linked to the specified YouTube content owner.
2548
+ # @param [String] page_token
2549
+ # The pageToken parameter identifies a specific page in the result set that
2550
+ # should be returned. In an API response, the nextPageToken and prevPageToken
2551
+ # properties identify other pages that could be retrieved.
2552
+ # @param [String] part
2553
+ # The part parameter specifies a comma-separated list of one or more
2554
+ # playlistItem resource properties that the API response will include.
2555
+ # If the parameter identifies a property that contains child properties, the
2556
+ # child properties will be included in the response. For example, in a
2557
+ # playlistItem resource, the snippet property contains numerous fields,
2558
+ # including the title, description, position, and resourceId properties. As such,
2559
+ # if you set part=snippet, the API response will contain all of those
2560
+ # properties.
2561
+ # @param [String] playlist_id
2562
+ # The playlistId parameter specifies the unique ID of the playlist for which you
2563
+ # want to retrieve playlist items. Note that even though this is an optional
2564
+ # parameter, every request to retrieve playlist items must specify a value for
2565
+ # either the id parameter or the playlistId parameter.
2566
+ # @param [String] video_id
2567
+ # The videoId parameter specifies that the request should return only the
2568
+ # playlist items that contain the specified video.
2569
+ # @param [String] fields
2570
+ # Selector specifying which fields to include in a partial response.
2571
+ # @param [String] quota_user
2572
+ # Available to use for quota purposes for server-side applications. Can be any
2573
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2574
+ # Overrides userIp if both are provided.
2575
+ # @param [String] user_ip
2576
+ # IP address of the site where the request originates. Use this if you want to
2577
+ # enforce per-user limits.
2578
+ # @param [Google::Apis::RequestOptions] options
2579
+ # Request-specific options
2580
+ #
2581
+ # @yield [result, err] Result & error if block supplied
2582
+ # @yieldparam result [Google::Apis::YoutubeV3::ListPlaylistItemsResponse] parsed result object
2583
+ # @yieldparam err [StandardError] error object if request failed
2584
+ #
2585
+ # @return [Google::Apis::YoutubeV3::ListPlaylistItemsResponse]
2586
+ #
2587
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2588
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2589
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2590
+ def list_playlist_items(id: nil, max_results: nil, on_behalf_of_content_owner: nil, page_token: nil, part: nil, playlist_id: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2591
+ path = 'playlistItems'
2592
+ command = make_simple_command(:get, path, options)
2593
+ command.response_representation = Google::Apis::YoutubeV3::ListPlaylistItemsResponse::Representation
2594
+ command.response_class = Google::Apis::YoutubeV3::ListPlaylistItemsResponse
2595
+ command.query['id'] = id unless id.nil?
2596
+ command.query['maxResults'] = max_results unless max_results.nil?
2597
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2598
+ command.query['pageToken'] = page_token unless page_token.nil?
2599
+ command.query['part'] = part unless part.nil?
2600
+ command.query['playlistId'] = playlist_id unless playlist_id.nil?
2601
+ command.query['videoId'] = video_id unless video_id.nil?
2602
+ command.query['fields'] = fields unless fields.nil?
2603
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2604
+ command.query['userIp'] = user_ip unless user_ip.nil?
2605
+ execute_or_queue_command(command, &block)
2606
+ end
2607
+
2608
+ # Modifies a playlist item. For example, you could update the item's position in
2609
+ # the playlist.
2610
+ # @param [Google::Apis::YoutubeV3::PlaylistItem] playlist_item_object
2611
+ # @param [String] part
2612
+ # The part parameter serves two purposes in this operation. It identifies the
2613
+ # properties that the write operation will set as well as the properties that
2614
+ # the API response will include.
2615
+ # Note that this method will override the existing values for all of the mutable
2616
+ # properties that are contained in any parts that the parameter value specifies.
2617
+ # For example, a playlist item can specify a start time and end time, which
2618
+ # identify the times portion of the video that should play when users watch the
2619
+ # video in the playlist. If your request is updating a playlist item that sets
2620
+ # these values, and the request's part parameter value includes the
2621
+ # contentDetails part, the playlist item's start and end times will be updated
2622
+ # to whatever value the request body specifies. If the request body does not
2623
+ # specify values, the existing start and end times will be removed and replaced
2624
+ # with the default settings.
2625
+ # @param [String] fields
2626
+ # Selector specifying which fields to include in a partial response.
2627
+ # @param [String] quota_user
2628
+ # Available to use for quota purposes for server-side applications. Can be any
2629
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2630
+ # Overrides userIp if both are provided.
2631
+ # @param [String] user_ip
2632
+ # IP address of the site where the request originates. Use this if you want to
2633
+ # enforce per-user limits.
2634
+ # @param [Google::Apis::RequestOptions] options
2635
+ # Request-specific options
2636
+ #
2637
+ # @yield [result, err] Result & error if block supplied
2638
+ # @yieldparam result [Google::Apis::YoutubeV3::PlaylistItem] parsed result object
2639
+ # @yieldparam err [StandardError] error object if request failed
2640
+ #
2641
+ # @return [Google::Apis::YoutubeV3::PlaylistItem]
2642
+ #
2643
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2644
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2645
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2646
+ def update_playlist_item(playlist_item_object = nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2647
+ path = 'playlistItems'
2648
+ command = make_simple_command(:put, path, options)
2649
+ command.request_representation = Google::Apis::YoutubeV3::PlaylistItem::Representation
2650
+ command.request_object = playlist_item_object
2651
+ command.response_representation = Google::Apis::YoutubeV3::PlaylistItem::Representation
2652
+ command.response_class = Google::Apis::YoutubeV3::PlaylistItem
2653
+ command.query['part'] = part unless part.nil?
2654
+ command.query['fields'] = fields unless fields.nil?
2655
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2656
+ command.query['userIp'] = user_ip unless user_ip.nil?
2657
+ execute_or_queue_command(command, &block)
2658
+ end
2659
+
2660
+ # Deletes a playlist.
2661
+ # @param [String] id
2662
+ # The id parameter specifies the YouTube playlist ID for the playlist that is
2663
+ # being deleted. In a playlist resource, the id property specifies the playlist'
2664
+ # s ID.
2665
+ # @param [String] on_behalf_of_content_owner
2666
+ # Note: This parameter is intended exclusively for YouTube content partners.
2667
+ # The onBehalfOfContentOwner parameter indicates that the request's
2668
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2669
+ # of the content owner specified in the parameter value. This parameter is
2670
+ # intended for YouTube content partners that own and manage many different
2671
+ # YouTube channels. It allows content owners to authenticate once and get access
2672
+ # to all their video and channel data, without having to provide authentication
2673
+ # credentials for each individual channel. The CMS account that the user
2674
+ # authenticates with must be linked to the specified YouTube content owner.
2675
+ # @param [String] fields
2676
+ # Selector specifying which fields to include in a partial response.
2677
+ # @param [String] quota_user
2678
+ # Available to use for quota purposes for server-side applications. Can be any
2679
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2680
+ # Overrides userIp if both are provided.
2681
+ # @param [String] user_ip
2682
+ # IP address of the site where the request originates. Use this if you want to
2683
+ # enforce per-user limits.
2684
+ # @param [Google::Apis::RequestOptions] options
2685
+ # Request-specific options
2686
+ #
2687
+ # @yield [result, err] Result & error if block supplied
2688
+ # @yieldparam result [NilClass] No result returned for this method
2689
+ # @yieldparam err [StandardError] error object if request failed
2690
+ #
2691
+ # @return [void]
2692
+ #
2693
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2694
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2695
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2696
+ def delete_playlist(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2697
+ path = 'playlists'
2698
+ command = make_simple_command(:delete, path, options)
2699
+ command.query['id'] = id unless id.nil?
2700
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2701
+ command.query['fields'] = fields unless fields.nil?
2702
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2703
+ command.query['userIp'] = user_ip unless user_ip.nil?
2704
+ execute_or_queue_command(command, &block)
2705
+ end
2706
+
2707
+ # Creates a playlist.
2708
+ # @param [Google::Apis::YoutubeV3::Playlist] playlist_object
2709
+ # @param [String] on_behalf_of_content_owner
2710
+ # Note: This parameter is intended exclusively for YouTube content partners.
2711
+ # The onBehalfOfContentOwner parameter indicates that the request's
2712
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2713
+ # of the content owner specified in the parameter value. This parameter is
2714
+ # intended for YouTube content partners that own and manage many different
2715
+ # YouTube channels. It allows content owners to authenticate once and get access
2716
+ # to all their video and channel data, without having to provide authentication
2717
+ # credentials for each individual channel. The CMS account that the user
2718
+ # authenticates with must be linked to the specified YouTube content owner.
2719
+ # @param [String] on_behalf_of_content_owner_channel
2720
+ # This parameter can only be used in a properly authorized request. Note: This
2721
+ # parameter is intended exclusively for YouTube content partners.
2722
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
2723
+ # of the channel to which a video is being added. This parameter is required
2724
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
2725
+ # it can only be used in conjunction with that parameter. In addition, the
2726
+ # request must be authorized using a CMS account that is linked to the content
2727
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
2728
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
2729
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
2730
+ # specifies.
2731
+ # This parameter is intended for YouTube content partners that own and manage
2732
+ # many different YouTube channels. It allows content owners to authenticate once
2733
+ # and perform actions on behalf of the channel specified in the parameter value,
2734
+ # without having to provide authentication credentials for each separate channel.
2735
+ # @param [String] part
2736
+ # The part parameter serves two purposes in this operation. It identifies the
2737
+ # properties that the write operation will set as well as the properties that
2738
+ # the API response will include.
2739
+ # @param [String] fields
2740
+ # Selector specifying which fields to include in a partial response.
2741
+ # @param [String] quota_user
2742
+ # Available to use for quota purposes for server-side applications. Can be any
2743
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2744
+ # Overrides userIp if both are provided.
2745
+ # @param [String] user_ip
2746
+ # IP address of the site where the request originates. Use this if you want to
2747
+ # enforce per-user limits.
2748
+ # @param [Google::Apis::RequestOptions] options
2749
+ # Request-specific options
2750
+ #
2751
+ # @yield [result, err] Result & error if block supplied
2752
+ # @yieldparam result [Google::Apis::YoutubeV3::Playlist] parsed result object
2753
+ # @yieldparam err [StandardError] error object if request failed
2754
+ #
2755
+ # @return [Google::Apis::YoutubeV3::Playlist]
2756
+ #
2757
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2758
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2759
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2760
+ def insert_playlist(playlist_object = nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2761
+ path = 'playlists'
2762
+ command = make_simple_command(:post, path, options)
2763
+ command.request_representation = Google::Apis::YoutubeV3::Playlist::Representation
2764
+ command.request_object = playlist_object
2765
+ command.response_representation = Google::Apis::YoutubeV3::Playlist::Representation
2766
+ command.response_class = Google::Apis::YoutubeV3::Playlist
2767
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2768
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
2769
+ command.query['part'] = part unless part.nil?
2770
+ command.query['fields'] = fields unless fields.nil?
2771
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2772
+ command.query['userIp'] = user_ip unless user_ip.nil?
2773
+ execute_or_queue_command(command, &block)
2774
+ end
2775
+
2776
+ # Returns a collection of playlists that match the API request parameters. For
2777
+ # example, you can retrieve all playlists that the authenticated user owns, or
2778
+ # you can retrieve one or more playlists by their unique IDs.
2779
+ # @param [String] channel_id
2780
+ # This value indicates that the API should only return the specified channel's
2781
+ # playlists.
2782
+ # @param [String] hl
2783
+ # The hl parameter should be used for filter out the properties that are not in
2784
+ # the given language. Used for the snippet part.
2785
+ # @param [String] id
2786
+ # The id parameter specifies a comma-separated list of the YouTube playlist ID(s)
2787
+ # for the resource(s) that are being retrieved. In a playlist resource, the id
2788
+ # property specifies the playlist's YouTube playlist ID.
2789
+ # @param [Fixnum] max_results
2790
+ # The maxResults parameter specifies the maximum number of items that should be
2791
+ # returned in the result set.
2792
+ # @param [Boolean] mine
2793
+ # Set this parameter's value to true to instruct the API to only return
2794
+ # playlists owned by the authenticated user.
2795
+ # @param [String] on_behalf_of_content_owner
2796
+ # Note: This parameter is intended exclusively for YouTube content partners.
2797
+ # The onBehalfOfContentOwner parameter indicates that the request's
2798
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2799
+ # of the content owner specified in the parameter value. This parameter is
2800
+ # intended for YouTube content partners that own and manage many different
2801
+ # YouTube channels. It allows content owners to authenticate once and get access
2802
+ # to all their video and channel data, without having to provide authentication
2803
+ # credentials for each individual channel. The CMS account that the user
2804
+ # authenticates with must be linked to the specified YouTube content owner.
2805
+ # @param [String] on_behalf_of_content_owner_channel
2806
+ # This parameter can only be used in a properly authorized request. Note: This
2807
+ # parameter is intended exclusively for YouTube content partners.
2808
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
2809
+ # of the channel to which a video is being added. This parameter is required
2810
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
2811
+ # it can only be used in conjunction with that parameter. In addition, the
2812
+ # request must be authorized using a CMS account that is linked to the content
2813
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
2814
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
2815
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
2816
+ # specifies.
2817
+ # This parameter is intended for YouTube content partners that own and manage
2818
+ # many different YouTube channels. It allows content owners to authenticate once
2819
+ # and perform actions on behalf of the channel specified in the parameter value,
2820
+ # without having to provide authentication credentials for each separate channel.
2821
+ # @param [String] page_token
2822
+ # The pageToken parameter identifies a specific page in the result set that
2823
+ # should be returned. In an API response, the nextPageToken and prevPageToken
2824
+ # properties identify other pages that could be retrieved.
2825
+ # @param [String] part
2826
+ # The part parameter specifies a comma-separated list of one or more playlist
2827
+ # resource properties that the API response will include.
2828
+ # If the parameter identifies a property that contains child properties, the
2829
+ # child properties will be included in the response. For example, in a playlist
2830
+ # resource, the snippet property contains properties like author, title,
2831
+ # description, tags, and timeCreated. As such, if you set part=snippet, the API
2832
+ # response will contain all of those properties.
2833
+ # @param [String] fields
2834
+ # Selector specifying which fields to include in a partial response.
2835
+ # @param [String] quota_user
2836
+ # Available to use for quota purposes for server-side applications. Can be any
2837
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2838
+ # Overrides userIp if both are provided.
2839
+ # @param [String] user_ip
2840
+ # IP address of the site where the request originates. Use this if you want to
2841
+ # enforce per-user limits.
2842
+ # @param [Google::Apis::RequestOptions] options
2843
+ # Request-specific options
2844
+ #
2845
+ # @yield [result, err] Result & error if block supplied
2846
+ # @yieldparam result [Google::Apis::YoutubeV3::ListPlaylistResponse] parsed result object
2847
+ # @yieldparam err [StandardError] error object if request failed
2848
+ #
2849
+ # @return [Google::Apis::YoutubeV3::ListPlaylistResponse]
2850
+ #
2851
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2852
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2853
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2854
+ def list_playlists(channel_id: nil, hl: nil, id: nil, max_results: nil, mine: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, page_token: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2855
+ path = 'playlists'
2856
+ command = make_simple_command(:get, path, options)
2857
+ command.response_representation = Google::Apis::YoutubeV3::ListPlaylistResponse::Representation
2858
+ command.response_class = Google::Apis::YoutubeV3::ListPlaylistResponse
2859
+ command.query['channelId'] = channel_id unless channel_id.nil?
2860
+ command.query['hl'] = hl unless hl.nil?
2861
+ command.query['id'] = id unless id.nil?
2862
+ command.query['maxResults'] = max_results unless max_results.nil?
2863
+ command.query['mine'] = mine unless mine.nil?
2864
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2865
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
2866
+ command.query['pageToken'] = page_token unless page_token.nil?
2867
+ command.query['part'] = part unless part.nil?
2868
+ command.query['fields'] = fields unless fields.nil?
2869
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2870
+ command.query['userIp'] = user_ip unless user_ip.nil?
2871
+ execute_or_queue_command(command, &block)
2872
+ end
2873
+
2874
+ # Modifies a playlist. For example, you could change a playlist's title,
2875
+ # description, or privacy status.
2876
+ # @param [Google::Apis::YoutubeV3::Playlist] playlist_object
2877
+ # @param [String] on_behalf_of_content_owner
2878
+ # Note: This parameter is intended exclusively for YouTube content partners.
2879
+ # The onBehalfOfContentOwner parameter indicates that the request's
2880
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2881
+ # of the content owner specified in the parameter value. This parameter is
2882
+ # intended for YouTube content partners that own and manage many different
2883
+ # YouTube channels. It allows content owners to authenticate once and get access
2884
+ # to all their video and channel data, without having to provide authentication
2885
+ # credentials for each individual channel. The CMS account that the user
2886
+ # authenticates with must be linked to the specified YouTube content owner.
2887
+ # @param [String] part
2888
+ # The part parameter serves two purposes in this operation. It identifies the
2889
+ # properties that the write operation will set as well as the properties that
2890
+ # the API response will include.
2891
+ # Note that this method will override the existing values for mutable properties
2892
+ # that are contained in any parts that the request body specifies. For example,
2893
+ # a playlist's description is contained in the snippet part, which must be
2894
+ # included in the request body. If the request does not specify a value for the
2895
+ # snippet.description property, the playlist's existing description will be
2896
+ # deleted.
2897
+ # @param [String] fields
2898
+ # Selector specifying which fields to include in a partial response.
2899
+ # @param [String] quota_user
2900
+ # Available to use for quota purposes for server-side applications. Can be any
2901
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2902
+ # Overrides userIp if both are provided.
2903
+ # @param [String] user_ip
2904
+ # IP address of the site where the request originates. Use this if you want to
2905
+ # enforce per-user limits.
2906
+ # @param [Google::Apis::RequestOptions] options
2907
+ # Request-specific options
2908
+ #
2909
+ # @yield [result, err] Result & error if block supplied
2910
+ # @yieldparam result [Google::Apis::YoutubeV3::Playlist] parsed result object
2911
+ # @yieldparam err [StandardError] error object if request failed
2912
+ #
2913
+ # @return [Google::Apis::YoutubeV3::Playlist]
2914
+ #
2915
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2916
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2917
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2918
+ def update_playlist(playlist_object = nil, on_behalf_of_content_owner: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2919
+ path = 'playlists'
2920
+ command = make_simple_command(:put, path, options)
2921
+ command.request_representation = Google::Apis::YoutubeV3::Playlist::Representation
2922
+ command.request_object = playlist_object
2923
+ command.response_representation = Google::Apis::YoutubeV3::Playlist::Representation
2924
+ command.response_class = Google::Apis::YoutubeV3::Playlist
2925
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2926
+ command.query['part'] = part unless part.nil?
2927
+ command.query['fields'] = fields unless fields.nil?
2928
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2929
+ command.query['userIp'] = user_ip unless user_ip.nil?
2930
+ execute_or_queue_command(command, &block)
2931
+ end
2932
+
2933
+ # Returns a collection of search results that match the query parameters
2934
+ # specified in the API request. By default, a search result set identifies
2935
+ # matching video, channel, and playlist resources, but you can also configure
2936
+ # queries to only retrieve a specific type of resource.
2937
+ # @param [String] channel_id
2938
+ # The channelId parameter indicates that the API response should only contain
2939
+ # resources created by the channel
2940
+ # @param [String] channel_type
2941
+ # The channelType parameter lets you restrict a search to a particular type of
2942
+ # channel.
2943
+ # @param [String] event_type
2944
+ # The eventType parameter restricts a search to broadcast events. If you specify
2945
+ # a value for this parameter, you must also set the type parameter's value to
2946
+ # video.
2947
+ # @param [Boolean] for_content_owner
2948
+ # Note: This parameter is intended exclusively for YouTube content partners.
2949
+ # The forContentOwner parameter restricts the search to only retrieve resources
2950
+ # owned by the content owner specified by the onBehalfOfContentOwner parameter.
2951
+ # The user must be authenticated using a CMS account linked to the specified
2952
+ # content owner and onBehalfOfContentOwner must be provided.
2953
+ # @param [Boolean] for_developer
2954
+ # The forDeveloper parameter restricts the search to only retrieve videos
2955
+ # uploaded via the developer's application or website. The API server uses the
2956
+ # request's authorization credentials to identify the developer. Therefore, a
2957
+ # developer can restrict results to videos uploaded through the developer's own
2958
+ # app or website but not to videos uploaded through other apps or sites.
2959
+ # @param [Boolean] for_mine
2960
+ # The forMine parameter restricts the search to only retrieve videos owned by
2961
+ # the authenticated user. If you set this parameter to true, then the type
2962
+ # parameter's value must also be set to video.
2963
+ # @param [String] location
2964
+ # The location parameter, in conjunction with the locationRadius parameter,
2965
+ # defines a circular geographic area and also restricts a search to videos that
2966
+ # specify, in their metadata, a geographic location that falls within that area.
2967
+ # The parameter value is a string that specifies latitude/longitude coordinates
2968
+ # e.g. (37.42307,-122.08427).
2969
+ # - The location parameter value identifies the point at the center of the area.
2970
+ # - The locationRadius parameter specifies the maximum distance that the
2971
+ # location associated with a video can be from that point for the video to still
2972
+ # be included in the search results.The API returns an error if your request
2973
+ # specifies a value for the location parameter but does not also specify a value
2974
+ # for the locationRadius parameter.
2975
+ # @param [String] location_radius
2976
+ # The locationRadius parameter, in conjunction with the location parameter,
2977
+ # defines a circular geographic area.
2978
+ # The parameter value must be a floating point number followed by a measurement
2979
+ # unit. Valid measurement units are m, km, ft, and mi. For example, valid
2980
+ # parameter values include 1500m, 5km, 10000ft, and 0.75mi. The API does not
2981
+ # support locationRadius parameter values larger than 1000 kilometers.
2982
+ # Note: See the definition of the location parameter for more information.
2983
+ # @param [Fixnum] max_results
2984
+ # The maxResults parameter specifies the maximum number of items that should be
2985
+ # returned in the result set.
2986
+ # @param [String] on_behalf_of_content_owner
2987
+ # Note: This parameter is intended exclusively for YouTube content partners.
2988
+ # The onBehalfOfContentOwner parameter indicates that the request's
2989
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
2990
+ # of the content owner specified in the parameter value. This parameter is
2991
+ # intended for YouTube content partners that own and manage many different
2992
+ # YouTube channels. It allows content owners to authenticate once and get access
2993
+ # to all their video and channel data, without having to provide authentication
2994
+ # credentials for each individual channel. The CMS account that the user
2995
+ # authenticates with must be linked to the specified YouTube content owner.
2996
+ # @param [String] order
2997
+ # The order parameter specifies the method that will be used to order resources
2998
+ # in the API response.
2999
+ # @param [String] page_token
3000
+ # The pageToken parameter identifies a specific page in the result set that
3001
+ # should be returned. In an API response, the nextPageToken and prevPageToken
3002
+ # properties identify other pages that could be retrieved.
3003
+ # @param [String] part
3004
+ # The part parameter specifies a comma-separated list of one or more search
3005
+ # resource properties that the API response will include. Set the parameter
3006
+ # value to snippet.
3007
+ # @param [DateTime] published_after
3008
+ # The publishedAfter parameter indicates that the API response should only
3009
+ # contain resources created after the specified time. The value is an RFC 3339
3010
+ # formatted date-time value (1970-01-01T00:00:00Z).
3011
+ # @param [DateTime] published_before
3012
+ # The publishedBefore parameter indicates that the API response should only
3013
+ # contain resources created before the specified time. The value is an RFC 3339
3014
+ # formatted date-time value (1970-01-01T00:00:00Z).
3015
+ # @param [String] q
3016
+ # The q parameter specifies the query term to search for.
3017
+ # Your request can also use the Boolean NOT (-) and OR (|) operators to exclude
3018
+ # videos or to find videos that are associated with one of several search terms.
3019
+ # For example, to search for videos matching either "boating" or "sailing", set
3020
+ # the q parameter value to boating|sailing. Similarly, to search for videos
3021
+ # matching either "boating" or "sailing" but not "fishing", set the q parameter
3022
+ # value to boating|sailing -fishing. Note that the pipe character must be URL-
3023
+ # escaped when it is sent in your API request. The URL-escaped value for the
3024
+ # pipe character is %7C.
3025
+ # @param [String] region_code
3026
+ # The regionCode parameter instructs the API to return search results for the
3027
+ # specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
3028
+ # @param [String] related_to_video_id
3029
+ # The relatedToVideoId parameter retrieves a list of videos that are related to
3030
+ # the video that the parameter value identifies. The parameter value must be set
3031
+ # to a YouTube video ID and, if you are using this parameter, the type parameter
3032
+ # must be set to video.
3033
+ # @param [String] relevance_language
3034
+ # The relevanceLanguage parameter instructs the API to return search results
3035
+ # that are most relevant to the specified language. The parameter value is
3036
+ # typically an ISO 639-1 two-letter language code. However, you should use the
3037
+ # values zh-Hans for simplified Chinese and zh-Hant for traditional Chinese.
3038
+ # Please note that results in other languages will still be returned if they are
3039
+ # highly relevant to the search query term.
3040
+ # @param [String] safe_search
3041
+ # The safeSearch parameter indicates whether the search results should include
3042
+ # restricted content as well as standard content.
3043
+ # @param [String] topic_id
3044
+ # The topicId parameter indicates that the API response should only contain
3045
+ # resources associated with the specified topic. The value identifies a Freebase
3046
+ # topic ID.
3047
+ # @param [String] type
3048
+ # The type parameter restricts a search query to only retrieve a particular type
3049
+ # of resource. The value is a comma-separated list of resource types.
3050
+ # @param [String] video_caption
3051
+ # The videoCaption parameter indicates whether the API should filter video
3052
+ # search results based on whether they have captions. If you specify a value for
3053
+ # this parameter, you must also set the type parameter's value to video.
3054
+ # @param [String] video_category_id
3055
+ # The videoCategoryId parameter filters video search results based on their
3056
+ # category. If you specify a value for this parameter, you must also set the
3057
+ # type parameter's value to video.
3058
+ # @param [String] video_definition
3059
+ # The videoDefinition parameter lets you restrict a search to only include
3060
+ # either high definition (HD) or standard definition (SD) videos. HD videos are
3061
+ # available for playback in at least 720p, though higher resolutions, like 1080p,
3062
+ # might also be available. If you specify a value for this parameter, you must
3063
+ # also set the type parameter's value to video.
3064
+ # @param [String] video_dimension
3065
+ # The videoDimension parameter lets you restrict a search to only retrieve 2D or
3066
+ # 3D videos. If you specify a value for this parameter, you must also set the
3067
+ # type parameter's value to video.
3068
+ # @param [String] video_duration
3069
+ # The videoDuration parameter filters video search results based on their
3070
+ # duration. If you specify a value for this parameter, you must also set the
3071
+ # type parameter's value to video.
3072
+ # @param [String] video_embeddable
3073
+ # The videoEmbeddable parameter lets you to restrict a search to only videos
3074
+ # that can be embedded into a webpage. If you specify a value for this parameter,
3075
+ # you must also set the type parameter's value to video.
3076
+ # @param [String] video_license
3077
+ # The videoLicense parameter filters search results to only include videos with
3078
+ # a particular license. YouTube lets video uploaders choose to attach either the
3079
+ # Creative Commons license or the standard YouTube license to each of their
3080
+ # videos. If you specify a value for this parameter, you must also set the type
3081
+ # parameter's value to video.
3082
+ # @param [String] video_syndicated
3083
+ # The videoSyndicated parameter lets you to restrict a search to only videos
3084
+ # that can be played outside youtube.com. If you specify a value for this
3085
+ # parameter, you must also set the type parameter's value to video.
3086
+ # @param [String] video_type
3087
+ # The videoType parameter lets you restrict a search to a particular type of
3088
+ # videos. If you specify a value for this parameter, you must also set the type
3089
+ # parameter's value to video.
3090
+ # @param [String] fields
3091
+ # Selector specifying which fields to include in a partial response.
3092
+ # @param [String] quota_user
3093
+ # Available to use for quota purposes for server-side applications. Can be any
3094
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3095
+ # Overrides userIp if both are provided.
3096
+ # @param [String] user_ip
3097
+ # IP address of the site where the request originates. Use this if you want to
3098
+ # enforce per-user limits.
3099
+ # @param [Google::Apis::RequestOptions] options
3100
+ # Request-specific options
3101
+ #
3102
+ # @yield [result, err] Result & error if block supplied
3103
+ # @yieldparam result [Google::Apis::YoutubeV3::SearchListsResponse] parsed result object
3104
+ # @yieldparam err [StandardError] error object if request failed
3105
+ #
3106
+ # @return [Google::Apis::YoutubeV3::SearchListsResponse]
3107
+ #
3108
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3109
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3110
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3111
+ def list_searches(channel_id: nil, channel_type: nil, event_type: nil, for_content_owner: nil, for_developer: nil, for_mine: nil, location: nil, location_radius: nil, max_results: nil, on_behalf_of_content_owner: nil, order: nil, page_token: nil, part: nil, published_after: nil, published_before: nil, q: nil, region_code: nil, related_to_video_id: nil, relevance_language: nil, safe_search: nil, topic_id: nil, type: nil, video_caption: nil, video_category_id: nil, video_definition: nil, video_dimension: nil, video_duration: nil, video_embeddable: nil, video_license: nil, video_syndicated: nil, video_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3112
+ path = 'search'
3113
+ command = make_simple_command(:get, path, options)
3114
+ command.response_representation = Google::Apis::YoutubeV3::SearchListsResponse::Representation
3115
+ command.response_class = Google::Apis::YoutubeV3::SearchListsResponse
3116
+ command.query['channelId'] = channel_id unless channel_id.nil?
3117
+ command.query['channelType'] = channel_type unless channel_type.nil?
3118
+ command.query['eventType'] = event_type unless event_type.nil?
3119
+ command.query['forContentOwner'] = for_content_owner unless for_content_owner.nil?
3120
+ command.query['forDeveloper'] = for_developer unless for_developer.nil?
3121
+ command.query['forMine'] = for_mine unless for_mine.nil?
3122
+ command.query['location'] = location unless location.nil?
3123
+ command.query['locationRadius'] = location_radius unless location_radius.nil?
3124
+ command.query['maxResults'] = max_results unless max_results.nil?
3125
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3126
+ command.query['order'] = order unless order.nil?
3127
+ command.query['pageToken'] = page_token unless page_token.nil?
3128
+ command.query['part'] = part unless part.nil?
3129
+ command.query['publishedAfter'] = published_after unless published_after.nil?
3130
+ command.query['publishedBefore'] = published_before unless published_before.nil?
3131
+ command.query['q'] = q unless q.nil?
3132
+ command.query['regionCode'] = region_code unless region_code.nil?
3133
+ command.query['relatedToVideoId'] = related_to_video_id unless related_to_video_id.nil?
3134
+ command.query['relevanceLanguage'] = relevance_language unless relevance_language.nil?
3135
+ command.query['safeSearch'] = safe_search unless safe_search.nil?
3136
+ command.query['topicId'] = topic_id unless topic_id.nil?
3137
+ command.query['type'] = type unless type.nil?
3138
+ command.query['videoCaption'] = video_caption unless video_caption.nil?
3139
+ command.query['videoCategoryId'] = video_category_id unless video_category_id.nil?
3140
+ command.query['videoDefinition'] = video_definition unless video_definition.nil?
3141
+ command.query['videoDimension'] = video_dimension unless video_dimension.nil?
3142
+ command.query['videoDuration'] = video_duration unless video_duration.nil?
3143
+ command.query['videoEmbeddable'] = video_embeddable unless video_embeddable.nil?
3144
+ command.query['videoLicense'] = video_license unless video_license.nil?
3145
+ command.query['videoSyndicated'] = video_syndicated unless video_syndicated.nil?
3146
+ command.query['videoType'] = video_type unless video_type.nil?
3147
+ command.query['fields'] = fields unless fields.nil?
3148
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3149
+ command.query['userIp'] = user_ip unless user_ip.nil?
3150
+ execute_or_queue_command(command, &block)
3151
+ end
3152
+
3153
+ # Deletes a subscription.
3154
+ # @param [String] id
3155
+ # The id parameter specifies the YouTube subscription ID for the resource that
3156
+ # is being deleted. In a subscription resource, the id property specifies the
3157
+ # YouTube subscription ID.
3158
+ # @param [String] fields
3159
+ # Selector specifying which fields to include in a partial response.
3160
+ # @param [String] quota_user
3161
+ # Available to use for quota purposes for server-side applications. Can be any
3162
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3163
+ # Overrides userIp if both are provided.
3164
+ # @param [String] user_ip
3165
+ # IP address of the site where the request originates. Use this if you want to
3166
+ # enforce per-user limits.
3167
+ # @param [Google::Apis::RequestOptions] options
3168
+ # Request-specific options
3169
+ #
3170
+ # @yield [result, err] Result & error if block supplied
3171
+ # @yieldparam result [NilClass] No result returned for this method
3172
+ # @yieldparam err [StandardError] error object if request failed
3173
+ #
3174
+ # @return [void]
3175
+ #
3176
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3177
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3178
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3179
+ def delete_subscription(id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3180
+ path = 'subscriptions'
3181
+ command = make_simple_command(:delete, path, options)
3182
+ command.query['id'] = id unless id.nil?
3183
+ command.query['fields'] = fields unless fields.nil?
3184
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3185
+ command.query['userIp'] = user_ip unless user_ip.nil?
3186
+ execute_or_queue_command(command, &block)
3187
+ end
3188
+
3189
+ # Adds a subscription for the authenticated user's channel.
3190
+ # @param [Google::Apis::YoutubeV3::Subscription] subscription_object
3191
+ # @param [String] part
3192
+ # The part parameter serves two purposes in this operation. It identifies the
3193
+ # properties that the write operation will set as well as the properties that
3194
+ # the API response will include.
3195
+ # @param [String] fields
3196
+ # Selector specifying which fields to include in a partial response.
3197
+ # @param [String] quota_user
3198
+ # Available to use for quota purposes for server-side applications. Can be any
3199
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3200
+ # Overrides userIp if both are provided.
3201
+ # @param [String] user_ip
3202
+ # IP address of the site where the request originates. Use this if you want to
3203
+ # enforce per-user limits.
3204
+ # @param [Google::Apis::RequestOptions] options
3205
+ # Request-specific options
3206
+ #
3207
+ # @yield [result, err] Result & error if block supplied
3208
+ # @yieldparam result [Google::Apis::YoutubeV3::Subscription] parsed result object
3209
+ # @yieldparam err [StandardError] error object if request failed
3210
+ #
3211
+ # @return [Google::Apis::YoutubeV3::Subscription]
3212
+ #
3213
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3214
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3215
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3216
+ def insert_subscription(subscription_object = nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3217
+ path = 'subscriptions'
3218
+ command = make_simple_command(:post, path, options)
3219
+ command.request_representation = Google::Apis::YoutubeV3::Subscription::Representation
3220
+ command.request_object = subscription_object
3221
+ command.response_representation = Google::Apis::YoutubeV3::Subscription::Representation
3222
+ command.response_class = Google::Apis::YoutubeV3::Subscription
3223
+ command.query['part'] = part unless part.nil?
3224
+ command.query['fields'] = fields unless fields.nil?
3225
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3226
+ command.query['userIp'] = user_ip unless user_ip.nil?
3227
+ execute_or_queue_command(command, &block)
3228
+ end
3229
+
3230
+ # Returns subscription resources that match the API request criteria.
3231
+ # @param [String] channel_id
3232
+ # The channelId parameter specifies a YouTube channel ID. The API will only
3233
+ # return that channel's subscriptions.
3234
+ # @param [String] for_channel_id
3235
+ # The forChannelId parameter specifies a comma-separated list of channel IDs.
3236
+ # The API response will then only contain subscriptions matching those channels.
3237
+ # @param [String] id
3238
+ # The id parameter specifies a comma-separated list of the YouTube subscription
3239
+ # ID(s) for the resource(s) that are being retrieved. In a subscription resource,
3240
+ # the id property specifies the YouTube subscription ID.
3241
+ # @param [Fixnum] max_results
3242
+ # The maxResults parameter specifies the maximum number of items that should be
3243
+ # returned in the result set.
3244
+ # @param [Boolean] mine
3245
+ # Set this parameter's value to true to retrieve a feed of the authenticated
3246
+ # user's subscriptions.
3247
+ # @param [Boolean] my_subscribers
3248
+ # Set this parameter's value to true to retrieve a feed of the subscribers of
3249
+ # the authenticated user.
3250
+ # @param [String] on_behalf_of_content_owner
3251
+ # Note: This parameter is intended exclusively for YouTube content partners.
3252
+ # The onBehalfOfContentOwner parameter indicates that the request's
3253
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
3254
+ # of the content owner specified in the parameter value. This parameter is
3255
+ # intended for YouTube content partners that own and manage many different
3256
+ # YouTube channels. It allows content owners to authenticate once and get access
3257
+ # to all their video and channel data, without having to provide authentication
3258
+ # credentials for each individual channel. The CMS account that the user
3259
+ # authenticates with must be linked to the specified YouTube content owner.
3260
+ # @param [String] on_behalf_of_content_owner_channel
3261
+ # This parameter can only be used in a properly authorized request. Note: This
3262
+ # parameter is intended exclusively for YouTube content partners.
3263
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
3264
+ # of the channel to which a video is being added. This parameter is required
3265
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
3266
+ # it can only be used in conjunction with that parameter. In addition, the
3267
+ # request must be authorized using a CMS account that is linked to the content
3268
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
3269
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
3270
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
3271
+ # specifies.
3272
+ # This parameter is intended for YouTube content partners that own and manage
3273
+ # many different YouTube channels. It allows content owners to authenticate once
3274
+ # and perform actions on behalf of the channel specified in the parameter value,
3275
+ # without having to provide authentication credentials for each separate channel.
3276
+ # @param [String] order
3277
+ # The order parameter specifies the method that will be used to sort resources
3278
+ # in the API response.
3279
+ # @param [String] page_token
3280
+ # The pageToken parameter identifies a specific page in the result set that
3281
+ # should be returned. In an API response, the nextPageToken and prevPageToken
3282
+ # properties identify other pages that could be retrieved.
3283
+ # @param [String] part
3284
+ # The part parameter specifies a comma-separated list of one or more
3285
+ # subscription resource properties that the API response will include.
3286
+ # If the parameter identifies a property that contains child properties, the
3287
+ # child properties will be included in the response. For example, in a
3288
+ # subscription resource, the snippet property contains other properties, such as
3289
+ # a display title for the subscription. If you set part=snippet, the API
3290
+ # response will also contain all of those nested properties.
3291
+ # @param [String] fields
3292
+ # Selector specifying which fields to include in a partial response.
3293
+ # @param [String] quota_user
3294
+ # Available to use for quota purposes for server-side applications. Can be any
3295
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3296
+ # Overrides userIp if both are provided.
3297
+ # @param [String] user_ip
3298
+ # IP address of the site where the request originates. Use this if you want to
3299
+ # enforce per-user limits.
3300
+ # @param [Google::Apis::RequestOptions] options
3301
+ # Request-specific options
3302
+ #
3303
+ # @yield [result, err] Result & error if block supplied
3304
+ # @yieldparam result [Google::Apis::YoutubeV3::ListSubscriptionResponse] parsed result object
3305
+ # @yieldparam err [StandardError] error object if request failed
3306
+ #
3307
+ # @return [Google::Apis::YoutubeV3::ListSubscriptionResponse]
3308
+ #
3309
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3310
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3311
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3312
+ def list_subscriptions(channel_id: nil, for_channel_id: nil, id: nil, max_results: nil, mine: nil, my_subscribers: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, order: nil, page_token: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3313
+ path = 'subscriptions'
3314
+ command = make_simple_command(:get, path, options)
3315
+ command.response_representation = Google::Apis::YoutubeV3::ListSubscriptionResponse::Representation
3316
+ command.response_class = Google::Apis::YoutubeV3::ListSubscriptionResponse
3317
+ command.query['channelId'] = channel_id unless channel_id.nil?
3318
+ command.query['forChannelId'] = for_channel_id unless for_channel_id.nil?
3319
+ command.query['id'] = id unless id.nil?
3320
+ command.query['maxResults'] = max_results unless max_results.nil?
3321
+ command.query['mine'] = mine unless mine.nil?
3322
+ command.query['mySubscribers'] = my_subscribers unless my_subscribers.nil?
3323
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3324
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
3325
+ command.query['order'] = order unless order.nil?
3326
+ command.query['pageToken'] = page_token unless page_token.nil?
3327
+ command.query['part'] = part unless part.nil?
3328
+ command.query['fields'] = fields unless fields.nil?
3329
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3330
+ command.query['userIp'] = user_ip unless user_ip.nil?
3331
+ execute_or_queue_command(command, &block)
3332
+ end
3333
+
3334
+ # Uploads a custom video thumbnail to YouTube and sets it for a video.
3335
+ # @param [String] on_behalf_of_content_owner
3336
+ # Note: This parameter is intended exclusively for YouTube content partners.
3337
+ # The onBehalfOfContentOwner parameter indicates that the request's
3338
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
3339
+ # of the content owner specified in the parameter value. This parameter is
3340
+ # intended for YouTube content partners that own and manage many different
3341
+ # YouTube channels. It allows content owners to authenticate once and get access
3342
+ # to all their video and channel data, without having to provide authentication
3343
+ # credentials for each individual channel. The actual CMS account that the user
3344
+ # authenticates with must be linked to the specified YouTube content owner.
3345
+ # @param [String] video_id
3346
+ # The videoId parameter specifies a YouTube video ID for which the custom video
3347
+ # thumbnail is being provided.
3348
+ # @param [String] fields
3349
+ # Selector specifying which fields to include in a partial response.
3350
+ # @param [String] quota_user
3351
+ # Available to use for quota purposes for server-side applications. Can be any
3352
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3353
+ # Overrides userIp if both are provided.
3354
+ # @param [String] user_ip
3355
+ # IP address of the site where the request originates. Use this if you want to
3356
+ # enforce per-user limits.
3357
+ # @param [IO, String] upload_source
3358
+ # IO stream or filename containing content to upload
3359
+ # @param [String] content_type
3360
+ # Content type of the uploaded content.
3361
+ # @param [Google::Apis::RequestOptions] options
3362
+ # Request-specific options
3363
+ #
3364
+ # @yield [result, err] Result & error if block supplied
3365
+ # @yieldparam result [Google::Apis::YoutubeV3::SetThumbnailResponse] parsed result object
3366
+ # @yieldparam err [StandardError] error object if request failed
3367
+ #
3368
+ # @return [Google::Apis::YoutubeV3::SetThumbnailResponse]
3369
+ #
3370
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3371
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3372
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3373
+ def set_thumbnail(on_behalf_of_content_owner: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
3374
+ path = 'thumbnails/set'
3375
+ if upload_source.nil?
3376
+ command = make_simple_command(:post, path, options)
3377
+ else
3378
+ command = make_upload_command(:post, path, options)
3379
+ command.upload_source = upload_source
3380
+ command.upload_content_type = content_type
3381
+ end
3382
+ command.response_representation = Google::Apis::YoutubeV3::SetThumbnailResponse::Representation
3383
+ command.response_class = Google::Apis::YoutubeV3::SetThumbnailResponse
3384
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3385
+ command.query['videoId'] = video_id unless video_id.nil?
3386
+ command.query['fields'] = fields unless fields.nil?
3387
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3388
+ command.query['userIp'] = user_ip unless user_ip.nil?
3389
+ execute_or_queue_command(command, &block)
3390
+ end
3391
+
3392
+ # Returns a list of abuse reasons that can be used for reporting abusive videos.
3393
+ # @param [String] hl
3394
+ # The hl parameter specifies the language that should be used for text values in
3395
+ # the API response.
3396
+ # @param [String] part
3397
+ # The part parameter specifies the videoCategory resource parts that the API
3398
+ # response will include. Supported values are id and snippet.
3399
+ # @param [String] fields
3400
+ # Selector specifying which fields to include in a partial response.
3401
+ # @param [String] quota_user
3402
+ # Available to use for quota purposes for server-side applications. Can be any
3403
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3404
+ # Overrides userIp if both are provided.
3405
+ # @param [String] user_ip
3406
+ # IP address of the site where the request originates. Use this if you want to
3407
+ # enforce per-user limits.
3408
+ # @param [Google::Apis::RequestOptions] options
3409
+ # Request-specific options
3410
+ #
3411
+ # @yield [result, err] Result & error if block supplied
3412
+ # @yieldparam result [Google::Apis::YoutubeV3::ListVideoAbuseReportReasonResponse] parsed result object
3413
+ # @yieldparam err [StandardError] error object if request failed
3414
+ #
3415
+ # @return [Google::Apis::YoutubeV3::ListVideoAbuseReportReasonResponse]
3416
+ #
3417
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3418
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3419
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3420
+ def list_video_abuse_report_reasons(hl: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3421
+ path = 'videoAbuseReportReasons'
3422
+ command = make_simple_command(:get, path, options)
3423
+ command.response_representation = Google::Apis::YoutubeV3::ListVideoAbuseReportReasonResponse::Representation
3424
+ command.response_class = Google::Apis::YoutubeV3::ListVideoAbuseReportReasonResponse
3425
+ command.query['hl'] = hl unless hl.nil?
3426
+ command.query['part'] = part unless part.nil?
3427
+ command.query['fields'] = fields unless fields.nil?
3428
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3429
+ command.query['userIp'] = user_ip unless user_ip.nil?
3430
+ execute_or_queue_command(command, &block)
3431
+ end
3432
+
3433
+ # Returns a list of categories that can be associated with YouTube videos.
3434
+ # @param [String] hl
3435
+ # The hl parameter specifies the language that should be used for text values in
3436
+ # the API response.
3437
+ # @param [String] id
3438
+ # The id parameter specifies a comma-separated list of video category IDs for
3439
+ # the resources that you are retrieving.
3440
+ # @param [String] part
3441
+ # The part parameter specifies the videoCategory resource properties that the
3442
+ # API response will include. Set the parameter value to snippet.
3443
+ # @param [String] region_code
3444
+ # The regionCode parameter instructs the API to return the list of video
3445
+ # categories available in the specified country. The parameter value is an ISO
3446
+ # 3166-1 alpha-2 country code.
3447
+ # @param [String] fields
3448
+ # Selector specifying which fields to include in a partial response.
3449
+ # @param [String] quota_user
3450
+ # Available to use for quota purposes for server-side applications. Can be any
3451
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3452
+ # Overrides userIp if both are provided.
3453
+ # @param [String] user_ip
3454
+ # IP address of the site where the request originates. Use this if you want to
3455
+ # enforce per-user limits.
3456
+ # @param [Google::Apis::RequestOptions] options
3457
+ # Request-specific options
3458
+ #
3459
+ # @yield [result, err] Result & error if block supplied
3460
+ # @yieldparam result [Google::Apis::YoutubeV3::ListVideoCategoryResponse] parsed result object
3461
+ # @yieldparam err [StandardError] error object if request failed
3462
+ #
3463
+ # @return [Google::Apis::YoutubeV3::ListVideoCategoryResponse]
3464
+ #
3465
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3466
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3467
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3468
+ def list_video_categories(hl: nil, id: nil, part: nil, region_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3469
+ path = 'videoCategories'
3470
+ command = make_simple_command(:get, path, options)
3471
+ command.response_representation = Google::Apis::YoutubeV3::ListVideoCategoryResponse::Representation
3472
+ command.response_class = Google::Apis::YoutubeV3::ListVideoCategoryResponse
3473
+ command.query['hl'] = hl unless hl.nil?
3474
+ command.query['id'] = id unless id.nil?
3475
+ command.query['part'] = part unless part.nil?
3476
+ command.query['regionCode'] = region_code unless region_code.nil?
3477
+ command.query['fields'] = fields unless fields.nil?
3478
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3479
+ command.query['userIp'] = user_ip unless user_ip.nil?
3480
+ execute_or_queue_command(command, &block)
3481
+ end
3482
+
3483
+ # Deletes a YouTube video.
3484
+ # @param [String] id
3485
+ # The id parameter specifies the YouTube video ID for the resource that is being
3486
+ # deleted. In a video resource, the id property specifies the video's ID.
3487
+ # @param [String] on_behalf_of_content_owner
3488
+ # Note: This parameter is intended exclusively for YouTube content partners.
3489
+ # The onBehalfOfContentOwner parameter indicates that the request's
3490
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
3491
+ # of the content owner specified in the parameter value. This parameter is
3492
+ # intended for YouTube content partners that own and manage many different
3493
+ # YouTube channels. It allows content owners to authenticate once and get access
3494
+ # to all their video and channel data, without having to provide authentication
3495
+ # credentials for each individual channel. The actual CMS account that the user
3496
+ # authenticates with must be linked to the specified YouTube content owner.
3497
+ # @param [String] fields
3498
+ # Selector specifying which fields to include in a partial response.
3499
+ # @param [String] quota_user
3500
+ # Available to use for quota purposes for server-side applications. Can be any
3501
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3502
+ # Overrides userIp if both are provided.
3503
+ # @param [String] user_ip
3504
+ # IP address of the site where the request originates. Use this if you want to
3505
+ # enforce per-user limits.
3506
+ # @param [Google::Apis::RequestOptions] options
3507
+ # Request-specific options
3508
+ #
3509
+ # @yield [result, err] Result & error if block supplied
3510
+ # @yieldparam result [NilClass] No result returned for this method
3511
+ # @yieldparam err [StandardError] error object if request failed
3512
+ #
3513
+ # @return [void]
3514
+ #
3515
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3516
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3517
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3518
+ def delete_video(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3519
+ path = 'videos'
3520
+ command = make_simple_command(:delete, path, options)
3521
+ command.query['id'] = id unless id.nil?
3522
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3523
+ command.query['fields'] = fields unless fields.nil?
3524
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3525
+ command.query['userIp'] = user_ip unless user_ip.nil?
3526
+ execute_or_queue_command(command, &block)
3527
+ end
3528
+
3529
+ # Retrieves the ratings that the authorized user gave to a list of specified
3530
+ # videos.
3531
+ # @param [String] id
3532
+ # The id parameter specifies a comma-separated list of the YouTube video ID(s)
3533
+ # for the resource(s) for which you are retrieving rating data. In a video
3534
+ # resource, the id property specifies the video's ID.
3535
+ # @param [String] on_behalf_of_content_owner
3536
+ # Note: This parameter is intended exclusively for YouTube content partners.
3537
+ # The onBehalfOfContentOwner parameter indicates that the request's
3538
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
3539
+ # of the content owner specified in the parameter value. This parameter is
3540
+ # intended for YouTube content partners that own and manage many different
3541
+ # YouTube channels. It allows content owners to authenticate once and get access
3542
+ # to all their video and channel data, without having to provide authentication
3543
+ # credentials for each individual channel. The CMS account that the user
3544
+ # authenticates with must be linked to the specified YouTube content owner.
3545
+ # @param [String] fields
3546
+ # Selector specifying which fields to include in a partial response.
3547
+ # @param [String] quota_user
3548
+ # Available to use for quota purposes for server-side applications. Can be any
3549
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3550
+ # Overrides userIp if both are provided.
3551
+ # @param [String] user_ip
3552
+ # IP address of the site where the request originates. Use this if you want to
3553
+ # enforce per-user limits.
3554
+ # @param [Google::Apis::RequestOptions] options
3555
+ # Request-specific options
3556
+ #
3557
+ # @yield [result, err] Result & error if block supplied
3558
+ # @yieldparam result [Google::Apis::YoutubeV3::GetVideoRatingResponse] parsed result object
3559
+ # @yieldparam err [StandardError] error object if request failed
3560
+ #
3561
+ # @return [Google::Apis::YoutubeV3::GetVideoRatingResponse]
3562
+ #
3563
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3564
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3565
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3566
+ def get_rating_video(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3567
+ path = 'videos/getRating'
3568
+ command = make_simple_command(:get, path, options)
3569
+ command.response_representation = Google::Apis::YoutubeV3::GetVideoRatingResponse::Representation
3570
+ command.response_class = Google::Apis::YoutubeV3::GetVideoRatingResponse
3571
+ command.query['id'] = id unless id.nil?
3572
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3573
+ command.query['fields'] = fields unless fields.nil?
3574
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3575
+ command.query['userIp'] = user_ip unless user_ip.nil?
3576
+ execute_or_queue_command(command, &block)
3577
+ end
3578
+
3579
+ # Uploads a video to YouTube and optionally sets the video's metadata.
3580
+ # @param [Google::Apis::YoutubeV3::Video] video_object
3581
+ # @param [Boolean] auto_levels
3582
+ # The autoLevels parameter indicates whether YouTube should automatically
3583
+ # enhance the video's lighting and color.
3584
+ # @param [Boolean] notify_subscribers
3585
+ # The notifySubscribers parameter indicates whether YouTube should send a
3586
+ # notification about the new video to users who subscribe to the video's channel.
3587
+ # A parameter value of True indicates that subscribers will be notified of
3588
+ # newly uploaded videos. However, a channel owner who is uploading many videos
3589
+ # might prefer to set the value to False to avoid sending a notification about
3590
+ # each new video to the channel's subscribers.
3591
+ # @param [String] on_behalf_of_content_owner
3592
+ # Note: This parameter is intended exclusively for YouTube content partners.
3593
+ # The onBehalfOfContentOwner parameter indicates that the request's
3594
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
3595
+ # of the content owner specified in the parameter value. This parameter is
3596
+ # intended for YouTube content partners that own and manage many different
3597
+ # YouTube channels. It allows content owners to authenticate once and get access
3598
+ # to all their video and channel data, without having to provide authentication
3599
+ # credentials for each individual channel. The CMS account that the user
3600
+ # authenticates with must be linked to the specified YouTube content owner.
3601
+ # @param [String] on_behalf_of_content_owner_channel
3602
+ # This parameter can only be used in a properly authorized request. Note: This
3603
+ # parameter is intended exclusively for YouTube content partners.
3604
+ # The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
3605
+ # of the channel to which a video is being added. This parameter is required
3606
+ # when a request specifies a value for the onBehalfOfContentOwner parameter, and
3607
+ # it can only be used in conjunction with that parameter. In addition, the
3608
+ # request must be authorized using a CMS account that is linked to the content
3609
+ # owner that the onBehalfOfContentOwner parameter specifies. Finally, the
3610
+ # channel that the onBehalfOfContentOwnerChannel parameter value specifies must
3611
+ # be linked to the content owner that the onBehalfOfContentOwner parameter
3612
+ # specifies.
3613
+ # This parameter is intended for YouTube content partners that own and manage
3614
+ # many different YouTube channels. It allows content owners to authenticate once
3615
+ # and perform actions on behalf of the channel specified in the parameter value,
3616
+ # without having to provide authentication credentials for each separate channel.
3617
+ # @param [String] part
3618
+ # The part parameter serves two purposes in this operation. It identifies the
3619
+ # properties that the write operation will set as well as the properties that
3620
+ # the API response will include.
3621
+ # Note that not all parts contain properties that can be set when inserting or
3622
+ # updating a video. For example, the statistics object encapsulates statistics
3623
+ # that YouTube calculates for a video and does not contain values that you can
3624
+ # set or modify. If the parameter value specifies a part that does not contain
3625
+ # mutable values, that part will still be included in the API response.
3626
+ # @param [Boolean] stabilize
3627
+ # The stabilize parameter indicates whether YouTube should adjust the video to
3628
+ # remove shaky camera motions.
3629
+ # @param [String] fields
3630
+ # Selector specifying which fields to include in a partial response.
3631
+ # @param [String] quota_user
3632
+ # Available to use for quota purposes for server-side applications. Can be any
3633
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3634
+ # Overrides userIp if both are provided.
3635
+ # @param [String] user_ip
3636
+ # IP address of the site where the request originates. Use this if you want to
3637
+ # enforce per-user limits.
3638
+ # @param [IO, String] upload_source
3639
+ # IO stream or filename containing content to upload
3640
+ # @param [String] content_type
3641
+ # Content type of the uploaded content.
3642
+ # @param [Google::Apis::RequestOptions] options
3643
+ # Request-specific options
3644
+ #
3645
+ # @yield [result, err] Result & error if block supplied
3646
+ # @yieldparam result [Google::Apis::YoutubeV3::Video] parsed result object
3647
+ # @yieldparam err [StandardError] error object if request failed
3648
+ #
3649
+ # @return [Google::Apis::YoutubeV3::Video]
3650
+ #
3651
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3652
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3653
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3654
+ def insert_video(video_object = nil, auto_levels: nil, notify_subscribers: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, part: nil, stabilize: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
3655
+ path = 'videos'
3656
+ if upload_source.nil?
3657
+ command = make_simple_command(:post, path, options)
3658
+ else
3659
+ command = make_upload_command(:post, path, options)
3660
+ command.upload_source = upload_source
3661
+ command.upload_content_type = content_type
3662
+ end
3663
+ command.request_representation = Google::Apis::YoutubeV3::Video::Representation
3664
+ command.request_object = video_object
3665
+ command.response_representation = Google::Apis::YoutubeV3::Video::Representation
3666
+ command.response_class = Google::Apis::YoutubeV3::Video
3667
+ command.query['autoLevels'] = auto_levels unless auto_levels.nil?
3668
+ command.query['notifySubscribers'] = notify_subscribers unless notify_subscribers.nil?
3669
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3670
+ command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?
3671
+ command.query['part'] = part unless part.nil?
3672
+ command.query['stabilize'] = stabilize unless stabilize.nil?
3673
+ command.query['fields'] = fields unless fields.nil?
3674
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3675
+ command.query['userIp'] = user_ip unless user_ip.nil?
3676
+ execute_or_queue_command(command, &block)
3677
+ end
3678
+
3679
+ # Returns a list of videos that match the API request parameters.
3680
+ # @param [String] chart
3681
+ # The chart parameter identifies the chart that you want to retrieve.
3682
+ # @param [String] debug_project_id_override
3683
+ # The debugProjectIdOverride parameter should be used for mimicking a request
3684
+ # for a certain project ID
3685
+ # @param [String] hl
3686
+ # The hl parameter instructs the API to retrieve localized resource metadata for
3687
+ # a specific application language that the YouTube website supports. The
3688
+ # parameter value must be a language code included in the list returned by the
3689
+ # i18nLanguages.list method.
3690
+ # If localized resource details are available in that language, the resource's
3691
+ # snippet.localized object will contain the localized values. However, if
3692
+ # localized details are not available, the snippet.localized object will contain
3693
+ # resource details in the resource's default language.
3694
+ # @param [String] id
3695
+ # The id parameter specifies a comma-separated list of the YouTube video ID(s)
3696
+ # for the resource(s) that are being retrieved. In a video resource, the id
3697
+ # property specifies the video's ID.
3698
+ # @param [String] locale
3699
+ # DEPRECATED
3700
+ # @param [Fixnum] max_results
3701
+ # The maxResults parameter specifies the maximum number of items that should be
3702
+ # returned in the result set.
3703
+ # Note: This parameter is supported for use in conjunction with the myRating
3704
+ # parameter, but it is not supported for use in conjunction with the id
3705
+ # parameter.
3706
+ # @param [String] my_rating
3707
+ # Set this parameter's value to like or dislike to instruct the API to only
3708
+ # return videos liked or disliked by the authenticated user.
3709
+ # @param [String] on_behalf_of_content_owner
3710
+ # Note: This parameter is intended exclusively for YouTube content partners.
3711
+ # The onBehalfOfContentOwner parameter indicates that the request's
3712
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
3713
+ # of the content owner specified in the parameter value. This parameter is
3714
+ # intended for YouTube content partners that own and manage many different
3715
+ # YouTube channels. It allows content owners to authenticate once and get access
3716
+ # to all their video and channel data, without having to provide authentication
3717
+ # credentials for each individual channel. The CMS account that the user
3718
+ # authenticates with must be linked to the specified YouTube content owner.
3719
+ # @param [String] page_token
3720
+ # The pageToken parameter identifies a specific page in the result set that
3721
+ # should be returned. In an API response, the nextPageToken and prevPageToken
3722
+ # properties identify other pages that could be retrieved.
3723
+ # Note: This parameter is supported for use in conjunction with the myRating
3724
+ # parameter, but it is not supported for use in conjunction with the id
3725
+ # parameter.
3726
+ # @param [String] part
3727
+ # The part parameter specifies a comma-separated list of one or more video
3728
+ # resource properties that the API response will include.
3729
+ # If the parameter identifies a property that contains child properties, the
3730
+ # child properties will be included in the response. For example, in a video
3731
+ # resource, the snippet property contains the channelId, title, description,
3732
+ # tags, and categoryId properties. As such, if you set part=snippet, the API
3733
+ # response will contain all of those properties.
3734
+ # @param [String] region_code
3735
+ # The regionCode parameter instructs the API to select a video chart available
3736
+ # in the specified region. This parameter can only be used in conjunction with
3737
+ # the chart parameter. The parameter value is an ISO 3166-1 alpha-2 country code.
3738
+ # @param [String] video_category_id
3739
+ # The videoCategoryId parameter identifies the video category for which the
3740
+ # chart should be retrieved. This parameter can only be used in conjunction with
3741
+ # the chart parameter. By default, charts are not restricted to a particular
3742
+ # category.
3743
+ # @param [String] fields
3744
+ # Selector specifying which fields to include in a partial response.
3745
+ # @param [String] quota_user
3746
+ # Available to use for quota purposes for server-side applications. Can be any
3747
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3748
+ # Overrides userIp if both are provided.
3749
+ # @param [String] user_ip
3750
+ # IP address of the site where the request originates. Use this if you want to
3751
+ # enforce per-user limits.
3752
+ # @param [Google::Apis::RequestOptions] options
3753
+ # Request-specific options
3754
+ #
3755
+ # @yield [result, err] Result & error if block supplied
3756
+ # @yieldparam result [Google::Apis::YoutubeV3::ListVideosResponse] parsed result object
3757
+ # @yieldparam err [StandardError] error object if request failed
3758
+ #
3759
+ # @return [Google::Apis::YoutubeV3::ListVideosResponse]
3760
+ #
3761
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3762
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3763
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3764
+ def list_videos(chart: nil, debug_project_id_override: nil, hl: nil, id: nil, locale: nil, max_results: nil, my_rating: nil, on_behalf_of_content_owner: nil, page_token: nil, part: nil, region_code: nil, video_category_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3765
+ path = 'videos'
3766
+ command = make_simple_command(:get, path, options)
3767
+ command.response_representation = Google::Apis::YoutubeV3::ListVideosResponse::Representation
3768
+ command.response_class = Google::Apis::YoutubeV3::ListVideosResponse
3769
+ command.query['chart'] = chart unless chart.nil?
3770
+ command.query['debugProjectIdOverride'] = debug_project_id_override unless debug_project_id_override.nil?
3771
+ command.query['hl'] = hl unless hl.nil?
3772
+ command.query['id'] = id unless id.nil?
3773
+ command.query['locale'] = locale unless locale.nil?
3774
+ command.query['maxResults'] = max_results unless max_results.nil?
3775
+ command.query['myRating'] = my_rating unless my_rating.nil?
3776
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3777
+ command.query['pageToken'] = page_token unless page_token.nil?
3778
+ command.query['part'] = part unless part.nil?
3779
+ command.query['regionCode'] = region_code unless region_code.nil?
3780
+ command.query['videoCategoryId'] = video_category_id unless video_category_id.nil?
3781
+ command.query['fields'] = fields unless fields.nil?
3782
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3783
+ command.query['userIp'] = user_ip unless user_ip.nil?
3784
+ execute_or_queue_command(command, &block)
3785
+ end
3786
+
3787
+ # Add a like or dislike rating to a video or remove a rating from a video.
3788
+ # @param [String] id
3789
+ # The id parameter specifies the YouTube video ID of the video that is being
3790
+ # rated or having its rating removed.
3791
+ # @param [String] rating
3792
+ # Specifies the rating to record.
3793
+ # @param [String] fields
3794
+ # Selector specifying which fields to include in a partial response.
3795
+ # @param [String] quota_user
3796
+ # Available to use for quota purposes for server-side applications. Can be any
3797
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3798
+ # Overrides userIp if both are provided.
3799
+ # @param [String] user_ip
3800
+ # IP address of the site where the request originates. Use this if you want to
3801
+ # enforce per-user limits.
3802
+ # @param [Google::Apis::RequestOptions] options
3803
+ # Request-specific options
3804
+ #
3805
+ # @yield [result, err] Result & error if block supplied
3806
+ # @yieldparam result [NilClass] No result returned for this method
3807
+ # @yieldparam err [StandardError] error object if request failed
3808
+ #
3809
+ # @return [void]
3810
+ #
3811
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3812
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3813
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3814
+ def rate_video(id: nil, rating: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3815
+ path = 'videos/rate'
3816
+ command = make_simple_command(:post, path, options)
3817
+ command.query['id'] = id unless id.nil?
3818
+ command.query['rating'] = rating unless rating.nil?
3819
+ command.query['fields'] = fields unless fields.nil?
3820
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3821
+ command.query['userIp'] = user_ip unless user_ip.nil?
3822
+ execute_or_queue_command(command, &block)
3823
+ end
3824
+
3825
+ # Report abuse for a video.
3826
+ # @param [Google::Apis::YoutubeV3::VideoAbuseReport] video_abuse_report_object
3827
+ # @param [String] on_behalf_of_content_owner
3828
+ # Note: This parameter is intended exclusively for YouTube content partners.
3829
+ # The onBehalfOfContentOwner parameter indicates that the request's
3830
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
3831
+ # of the content owner specified in the parameter value. This parameter is
3832
+ # intended for YouTube content partners that own and manage many different
3833
+ # YouTube channels. It allows content owners to authenticate once and get access
3834
+ # to all their video and channel data, without having to provide authentication
3835
+ # credentials for each individual channel. The CMS account that the user
3836
+ # authenticates with must be linked to the specified YouTube content owner.
3837
+ # @param [String] fields
3838
+ # Selector specifying which fields to include in a partial response.
3839
+ # @param [String] quota_user
3840
+ # Available to use for quota purposes for server-side applications. Can be any
3841
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3842
+ # Overrides userIp if both are provided.
3843
+ # @param [String] user_ip
3844
+ # IP address of the site where the request originates. Use this if you want to
3845
+ # enforce per-user limits.
3846
+ # @param [Google::Apis::RequestOptions] options
3847
+ # Request-specific options
3848
+ #
3849
+ # @yield [result, err] Result & error if block supplied
3850
+ # @yieldparam result [NilClass] No result returned for this method
3851
+ # @yieldparam err [StandardError] error object if request failed
3852
+ #
3853
+ # @return [void]
3854
+ #
3855
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3856
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3857
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3858
+ def report_abuse_video(video_abuse_report_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3859
+ path = 'videos/reportAbuse'
3860
+ command = make_simple_command(:post, path, options)
3861
+ command.request_representation = Google::Apis::YoutubeV3::VideoAbuseReport::Representation
3862
+ command.request_object = video_abuse_report_object
3863
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3864
+ command.query['fields'] = fields unless fields.nil?
3865
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3866
+ command.query['userIp'] = user_ip unless user_ip.nil?
3867
+ execute_or_queue_command(command, &block)
3868
+ end
3869
+
3870
+ # Updates a video's metadata.
3871
+ # @param [Google::Apis::YoutubeV3::Video] video_object
3872
+ # @param [String] on_behalf_of_content_owner
3873
+ # Note: This parameter is intended exclusively for YouTube content partners.
3874
+ # The onBehalfOfContentOwner parameter indicates that the request's
3875
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
3876
+ # of the content owner specified in the parameter value. This parameter is
3877
+ # intended for YouTube content partners that own and manage many different
3878
+ # YouTube channels. It allows content owners to authenticate once and get access
3879
+ # to all their video and channel data, without having to provide authentication
3880
+ # credentials for each individual channel. The actual CMS account that the user
3881
+ # authenticates with must be linked to the specified YouTube content owner.
3882
+ # @param [String] part
3883
+ # The part parameter serves two purposes in this operation. It identifies the
3884
+ # properties that the write operation will set as well as the properties that
3885
+ # the API response will include.
3886
+ # Note that this method will override the existing values for all of the mutable
3887
+ # properties that are contained in any parts that the parameter value specifies.
3888
+ # For example, a video's privacy setting is contained in the status part. As
3889
+ # such, if your request is updating a private video, and the request's part
3890
+ # parameter value includes the status part, the video's privacy setting will be
3891
+ # updated to whatever value the request body specifies. If the request body does
3892
+ # not specify a value, the existing privacy setting will be removed and the
3893
+ # video will revert to the default privacy setting.
3894
+ # In addition, not all parts contain properties that can be set when inserting
3895
+ # or updating a video. For example, the statistics object encapsulates
3896
+ # statistics that YouTube calculates for a video and does not contain values
3897
+ # that you can set or modify. If the parameter value specifies a part that does
3898
+ # not contain mutable values, that part will still be included in the API
3899
+ # response.
3900
+ # @param [String] fields
3901
+ # Selector specifying which fields to include in a partial response.
3902
+ # @param [String] quota_user
3903
+ # Available to use for quota purposes for server-side applications. Can be any
3904
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3905
+ # Overrides userIp if both are provided.
3906
+ # @param [String] user_ip
3907
+ # IP address of the site where the request originates. Use this if you want to
3908
+ # enforce per-user limits.
3909
+ # @param [Google::Apis::RequestOptions] options
3910
+ # Request-specific options
3911
+ #
3912
+ # @yield [result, err] Result & error if block supplied
3913
+ # @yieldparam result [Google::Apis::YoutubeV3::Video] parsed result object
3914
+ # @yieldparam err [StandardError] error object if request failed
3915
+ #
3916
+ # @return [Google::Apis::YoutubeV3::Video]
3917
+ #
3918
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3919
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3920
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3921
+ def update_video(video_object = nil, on_behalf_of_content_owner: nil, part: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3922
+ path = 'videos'
3923
+ command = make_simple_command(:put, path, options)
3924
+ command.request_representation = Google::Apis::YoutubeV3::Video::Representation
3925
+ command.request_object = video_object
3926
+ command.response_representation = Google::Apis::YoutubeV3::Video::Representation
3927
+ command.response_class = Google::Apis::YoutubeV3::Video
3928
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3929
+ command.query['part'] = part unless part.nil?
3930
+ command.query['fields'] = fields unless fields.nil?
3931
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3932
+ command.query['userIp'] = user_ip unless user_ip.nil?
3933
+ execute_or_queue_command(command, &block)
3934
+ end
3935
+
3936
+ # Uploads a watermark image to YouTube and sets it for a channel.
3937
+ # @param [Google::Apis::YoutubeV3::InvideoBranding] invideo_branding_object
3938
+ # @param [String] channel_id
3939
+ # The channelId parameter specifies the YouTube channel ID for which the
3940
+ # watermark is being provided.
3941
+ # @param [String] on_behalf_of_content_owner
3942
+ # Note: This parameter is intended exclusively for YouTube content partners.
3943
+ # The onBehalfOfContentOwner parameter indicates that the request's
3944
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
3945
+ # of the content owner specified in the parameter value. This parameter is
3946
+ # intended for YouTube content partners that own and manage many different
3947
+ # YouTube channels. It allows content owners to authenticate once and get access
3948
+ # to all their video and channel data, without having to provide authentication
3949
+ # credentials for each individual channel. The CMS account that the user
3950
+ # authenticates with must be linked to the specified YouTube content owner.
3951
+ # @param [String] fields
3952
+ # Selector specifying which fields to include in a partial response.
3953
+ # @param [String] quota_user
3954
+ # Available to use for quota purposes for server-side applications. Can be any
3955
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3956
+ # Overrides userIp if both are provided.
3957
+ # @param [String] user_ip
3958
+ # IP address of the site where the request originates. Use this if you want to
3959
+ # enforce per-user limits.
3960
+ # @param [IO, String] upload_source
3961
+ # IO stream or filename containing content to upload
3962
+ # @param [String] content_type
3963
+ # Content type of the uploaded content.
3964
+ # @param [Google::Apis::RequestOptions] options
3965
+ # Request-specific options
3966
+ #
3967
+ # @yield [result, err] Result & error if block supplied
3968
+ # @yieldparam result [NilClass] No result returned for this method
3969
+ # @yieldparam err [StandardError] error object if request failed
3970
+ #
3971
+ # @return [void]
3972
+ #
3973
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3974
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3975
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3976
+ def set_watermark(invideo_branding_object = nil, channel_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
3977
+ path = 'watermarks/set'
3978
+ if upload_source.nil?
3979
+ command = make_simple_command(:post, path, options)
3980
+ else
3981
+ command = make_upload_command(:post, path, options)
3982
+ command.upload_source = upload_source
3983
+ command.upload_content_type = content_type
3984
+ end
3985
+ command.request_representation = Google::Apis::YoutubeV3::InvideoBranding::Representation
3986
+ command.request_object = invideo_branding_object
3987
+ command.query['channelId'] = channel_id unless channel_id.nil?
3988
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3989
+ command.query['fields'] = fields unless fields.nil?
3990
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3991
+ command.query['userIp'] = user_ip unless user_ip.nil?
3992
+ execute_or_queue_command(command, &block)
3993
+ end
3994
+
3995
+ # Deletes a channel's watermark image.
3996
+ # @param [String] channel_id
3997
+ # The channelId parameter specifies the YouTube channel ID for which the
3998
+ # watermark is being unset.
3999
+ # @param [String] on_behalf_of_content_owner
4000
+ # Note: This parameter is intended exclusively for YouTube content partners.
4001
+ # The onBehalfOfContentOwner parameter indicates that the request's
4002
+ # authorization credentials identify a YouTube CMS user who is acting on behalf
4003
+ # of the content owner specified in the parameter value. This parameter is
4004
+ # intended for YouTube content partners that own and manage many different
4005
+ # YouTube channels. It allows content owners to authenticate once and get access
4006
+ # to all their video and channel data, without having to provide authentication
4007
+ # credentials for each individual channel. The CMS account that the user
4008
+ # authenticates with must be linked to the specified YouTube content owner.
4009
+ # @param [String] fields
4010
+ # Selector specifying which fields to include in a partial response.
4011
+ # @param [String] quota_user
4012
+ # Available to use for quota purposes for server-side applications. Can be any
4013
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4014
+ # Overrides userIp if both are provided.
4015
+ # @param [String] user_ip
4016
+ # IP address of the site where the request originates. Use this if you want to
4017
+ # enforce per-user limits.
4018
+ # @param [Google::Apis::RequestOptions] options
4019
+ # Request-specific options
4020
+ #
4021
+ # @yield [result, err] Result & error if block supplied
4022
+ # @yieldparam result [NilClass] No result returned for this method
4023
+ # @yieldparam err [StandardError] error object if request failed
4024
+ #
4025
+ # @return [void]
4026
+ #
4027
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4028
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4029
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4030
+ def unset_watermark(channel_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
4031
+ path = 'watermarks/unset'
4032
+ command = make_simple_command(:post, path, options)
4033
+ command.query['channelId'] = channel_id unless channel_id.nil?
4034
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
4035
+ command.query['fields'] = fields unless fields.nil?
4036
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4037
+ command.query['userIp'] = user_ip unless user_ip.nil?
4038
+ execute_or_queue_command(command, &block)
4039
+ end
4040
+
4041
+ protected
4042
+
4043
+ def apply_command_defaults(command)
4044
+ command.query['key'] = key unless key.nil?
4045
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4046
+ command.query['userIp'] = user_ip unless user_ip.nil?
4047
+ end
4048
+ end
4049
+ end
4050
+ end
4051
+ end