lemboy-google-api-client 0.9.26

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