google-api-client 0.8.6 → 0.9

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