google-api-client 0.8.7 → 0.9.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,1620 @@
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 BloggerV3
23
+ # Blogger API
24
+ #
25
+ # API for access to the data within Blogger.
26
+ #
27
+ # @example
28
+ # require 'google/apis/blogger_v3'
29
+ #
30
+ # Blogger = Google::Apis::BloggerV3 # Alias the module
31
+ # service = Blogger::BloggerService.new
32
+ #
33
+ # @see https://developers.google.com/blogger/docs/3.0/getting_started
34
+ class BloggerService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'blogger/v3/')
53
+ end
54
+
55
+ # Gets one blog and user info pair by blogId and userId.
56
+ # @param [String] user_id
57
+ # ID of the user whose blogs are to be fetched. Either the word 'self' (sans
58
+ # quote marks) or the user's profile identifier.
59
+ # @param [String] blog_id
60
+ # The ID of the blog to get.
61
+ # @param [Fixnum] max_posts
62
+ # Maximum number of posts to pull back with the blog.
63
+ # @param [String] fields
64
+ # Selector specifying which fields to include in a partial response.
65
+ # @param [String] quota_user
66
+ # Available to use for quota purposes for server-side applications. Can be any
67
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
68
+ # Overrides userIp if both are provided.
69
+ # @param [String] user_ip
70
+ # IP address of the site where the request originates. Use this if you want to
71
+ # enforce per-user limits.
72
+ # @param [Google::Apis::RequestOptions] options
73
+ # Request-specific options
74
+ #
75
+ # @yield [result, err] Result & error if block supplied
76
+ # @yieldparam result [Google::Apis::BloggerV3::BlogUserInfo] parsed result object
77
+ # @yieldparam err [StandardError] error object if request failed
78
+ #
79
+ # @return [Google::Apis::BloggerV3::BlogUserInfo]
80
+ #
81
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
82
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
83
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
84
+ def get_blog_user_info(user_id, blog_id, max_posts: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
85
+ path = 'users/{userId}/blogs/{blogId}'
86
+ command = make_simple_command(:get, path, options)
87
+ command.response_representation = Google::Apis::BloggerV3::BlogUserInfo::Representation
88
+ command.response_class = Google::Apis::BloggerV3::BlogUserInfo
89
+ command.params['userId'] = user_id unless user_id.nil?
90
+ command.params['blogId'] = blog_id unless blog_id.nil?
91
+ command.query['maxPosts'] = max_posts unless max_posts.nil?
92
+ command.query['fields'] = fields unless fields.nil?
93
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
94
+ command.query['userIp'] = user_ip unless user_ip.nil?
95
+ execute_or_queue_command(command, &block)
96
+ end
97
+
98
+ # Gets one blog by ID.
99
+ # @param [String] blog_id
100
+ # The ID of the blog to get.
101
+ # @param [Fixnum] max_posts
102
+ # Maximum number of posts to pull back with the blog.
103
+ # @param [String] view
104
+ # Access level with which to view the blog. Note that some fields require
105
+ # elevated access.
106
+ # @param [String] fields
107
+ # Selector specifying which fields to include in a partial response.
108
+ # @param [String] quota_user
109
+ # Available to use for quota purposes for server-side applications. Can be any
110
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
111
+ # Overrides userIp if both are provided.
112
+ # @param [String] user_ip
113
+ # IP address of the site where the request originates. Use this if you want to
114
+ # enforce per-user limits.
115
+ # @param [Google::Apis::RequestOptions] options
116
+ # Request-specific options
117
+ #
118
+ # @yield [result, err] Result & error if block supplied
119
+ # @yieldparam result [Google::Apis::BloggerV3::Blog] parsed result object
120
+ # @yieldparam err [StandardError] error object if request failed
121
+ #
122
+ # @return [Google::Apis::BloggerV3::Blog]
123
+ #
124
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
125
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
126
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
127
+ def get_blog(blog_id, max_posts: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
128
+ path = 'blogs/{blogId}'
129
+ command = make_simple_command(:get, path, options)
130
+ command.response_representation = Google::Apis::BloggerV3::Blog::Representation
131
+ command.response_class = Google::Apis::BloggerV3::Blog
132
+ command.params['blogId'] = blog_id unless blog_id.nil?
133
+ command.query['maxPosts'] = max_posts unless max_posts.nil?
134
+ command.query['view'] = view unless view.nil?
135
+ command.query['fields'] = fields unless fields.nil?
136
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
137
+ command.query['userIp'] = user_ip unless user_ip.nil?
138
+ execute_or_queue_command(command, &block)
139
+ end
140
+
141
+ # Retrieve a Blog by URL.
142
+ # @param [String] url
143
+ # The URL of the blog to retrieve.
144
+ # @param [String] view
145
+ # Access level with which to view the blog. Note that some fields require
146
+ # elevated access.
147
+ # @param [String] fields
148
+ # Selector specifying which fields to include in a partial response.
149
+ # @param [String] quota_user
150
+ # Available to use for quota purposes for server-side applications. Can be any
151
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
152
+ # Overrides userIp if both are provided.
153
+ # @param [String] user_ip
154
+ # IP address of the site where the request originates. Use this if you want to
155
+ # enforce per-user limits.
156
+ # @param [Google::Apis::RequestOptions] options
157
+ # Request-specific options
158
+ #
159
+ # @yield [result, err] Result & error if block supplied
160
+ # @yieldparam result [Google::Apis::BloggerV3::Blog] parsed result object
161
+ # @yieldparam err [StandardError] error object if request failed
162
+ #
163
+ # @return [Google::Apis::BloggerV3::Blog]
164
+ #
165
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
166
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
167
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
168
+ def get_blog_by_url(url: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
169
+ path = 'blogs/byurl'
170
+ command = make_simple_command(:get, path, options)
171
+ command.response_representation = Google::Apis::BloggerV3::Blog::Representation
172
+ command.response_class = Google::Apis::BloggerV3::Blog
173
+ command.query['url'] = url unless url.nil?
174
+ command.query['view'] = view unless view.nil?
175
+ command.query['fields'] = fields unless fields.nil?
176
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
177
+ command.query['userIp'] = user_ip unless user_ip.nil?
178
+ execute_or_queue_command(command, &block)
179
+ end
180
+
181
+ # Retrieves a list of blogs, possibly filtered.
182
+ # @param [String] user_id
183
+ # ID of the user whose blogs are to be fetched. Either the word 'self' (sans
184
+ # quote marks) or the user's profile identifier.
185
+ # @param [Boolean] fetch_user_info
186
+ # Whether the response is a list of blogs with per-user information instead of
187
+ # just blogs.
188
+ # @param [Array<String>, String] role
189
+ # User access types for blogs to include in the results, e.g. AUTHOR will return
190
+ # blogs where the user has author level access. If no roles are specified,
191
+ # defaults to ADMIN and AUTHOR roles.
192
+ # @param [Array<String>, String] status
193
+ # Blog statuses to include in the result (default: Live blogs only). Note that
194
+ # ADMIN access is required to view deleted blogs.
195
+ # @param [String] view
196
+ # Access level with which to view the blogs. Note that some fields require
197
+ # elevated access.
198
+ # @param [String] fields
199
+ # Selector specifying which fields to include in a partial response.
200
+ # @param [String] quota_user
201
+ # Available to use for quota purposes for server-side applications. Can be any
202
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
203
+ # Overrides userIp if both are provided.
204
+ # @param [String] user_ip
205
+ # IP address of the site where the request originates. Use this if you want to
206
+ # enforce per-user limits.
207
+ # @param [Google::Apis::RequestOptions] options
208
+ # Request-specific options
209
+ #
210
+ # @yield [result, err] Result & error if block supplied
211
+ # @yieldparam result [Google::Apis::BloggerV3::BlogList] parsed result object
212
+ # @yieldparam err [StandardError] error object if request failed
213
+ #
214
+ # @return [Google::Apis::BloggerV3::BlogList]
215
+ #
216
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
217
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
218
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
219
+ def list_blogs_by_user(user_id, fetch_user_info: nil, role: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
220
+ path = 'users/{userId}/blogs'
221
+ command = make_simple_command(:get, path, options)
222
+ command.response_representation = Google::Apis::BloggerV3::BlogList::Representation
223
+ command.response_class = Google::Apis::BloggerV3::BlogList
224
+ command.params['userId'] = user_id unless user_id.nil?
225
+ command.query['fetchUserInfo'] = fetch_user_info unless fetch_user_info.nil?
226
+ command.query['role'] = role unless role.nil?
227
+ command.query['status'] = status unless status.nil?
228
+ command.query['view'] = view unless view.nil?
229
+ command.query['fields'] = fields unless fields.nil?
230
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
231
+ command.query['userIp'] = user_ip unless user_ip.nil?
232
+ execute_or_queue_command(command, &block)
233
+ end
234
+
235
+ # Marks a comment as not spam.
236
+ # @param [String] blog_id
237
+ # The ID of the Blog.
238
+ # @param [String] post_id
239
+ # The ID of the Post.
240
+ # @param [String] comment_id
241
+ # The ID of the comment to mark as not spam.
242
+ # @param [String] fields
243
+ # Selector specifying which fields to include in a partial response.
244
+ # @param [String] quota_user
245
+ # Available to use for quota purposes for server-side applications. Can be any
246
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
247
+ # Overrides userIp if both are provided.
248
+ # @param [String] user_ip
249
+ # IP address of the site where the request originates. Use this if you want to
250
+ # enforce per-user limits.
251
+ # @param [Google::Apis::RequestOptions] options
252
+ # Request-specific options
253
+ #
254
+ # @yield [result, err] Result & error if block supplied
255
+ # @yieldparam result [Google::Apis::BloggerV3::Comment] parsed result object
256
+ # @yieldparam err [StandardError] error object if request failed
257
+ #
258
+ # @return [Google::Apis::BloggerV3::Comment]
259
+ #
260
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
261
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
262
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
263
+ def approve_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
264
+ path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}/approve'
265
+ command = make_simple_command(:post, path, options)
266
+ command.response_representation = Google::Apis::BloggerV3::Comment::Representation
267
+ command.response_class = Google::Apis::BloggerV3::Comment
268
+ command.params['blogId'] = blog_id unless blog_id.nil?
269
+ command.params['postId'] = post_id unless post_id.nil?
270
+ command.params['commentId'] = comment_id unless comment_id.nil?
271
+ command.query['fields'] = fields unless fields.nil?
272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
273
+ command.query['userIp'] = user_ip unless user_ip.nil?
274
+ execute_or_queue_command(command, &block)
275
+ end
276
+
277
+ # Delete a comment by ID.
278
+ # @param [String] blog_id
279
+ # The ID of the Blog.
280
+ # @param [String] post_id
281
+ # The ID of the Post.
282
+ # @param [String] comment_id
283
+ # The ID of the comment to delete.
284
+ # @param [String] fields
285
+ # Selector specifying which fields to include in a partial response.
286
+ # @param [String] quota_user
287
+ # Available to use for quota purposes for server-side applications. Can be any
288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
289
+ # Overrides userIp if both are provided.
290
+ # @param [String] user_ip
291
+ # IP address of the site where the request originates. Use this if you want to
292
+ # enforce per-user limits.
293
+ # @param [Google::Apis::RequestOptions] options
294
+ # Request-specific options
295
+ #
296
+ # @yield [result, err] Result & error if block supplied
297
+ # @yieldparam result [NilClass] No result returned for this method
298
+ # @yieldparam err [StandardError] error object if request failed
299
+ #
300
+ # @return [void]
301
+ #
302
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
303
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
304
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
305
+ def delete_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
306
+ path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}'
307
+ command = make_simple_command(:delete, path, options)
308
+ command.params['blogId'] = blog_id unless blog_id.nil?
309
+ command.params['postId'] = post_id unless post_id.nil?
310
+ command.params['commentId'] = comment_id unless comment_id.nil?
311
+ command.query['fields'] = fields unless fields.nil?
312
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
313
+ command.query['userIp'] = user_ip unless user_ip.nil?
314
+ execute_or_queue_command(command, &block)
315
+ end
316
+
317
+ # Gets one comment by ID.
318
+ # @param [String] blog_id
319
+ # ID of the blog to containing the comment.
320
+ # @param [String] post_id
321
+ # ID of the post to fetch posts from.
322
+ # @param [String] comment_id
323
+ # The ID of the comment to get.
324
+ # @param [String] view
325
+ # Access level for the requested comment (default: READER). Note that some
326
+ # comments will require elevated permissions, for example comments where the
327
+ # parent posts which is in a draft state, or comments that are pending
328
+ # moderation.
329
+ # @param [String] fields
330
+ # Selector specifying which fields to include in a partial response.
331
+ # @param [String] quota_user
332
+ # Available to use for quota purposes for server-side applications. Can be any
333
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
334
+ # Overrides userIp if both are provided.
335
+ # @param [String] user_ip
336
+ # IP address of the site where the request originates. Use this if you want to
337
+ # enforce per-user limits.
338
+ # @param [Google::Apis::RequestOptions] options
339
+ # Request-specific options
340
+ #
341
+ # @yield [result, err] Result & error if block supplied
342
+ # @yieldparam result [Google::Apis::BloggerV3::Comment] parsed result object
343
+ # @yieldparam err [StandardError] error object if request failed
344
+ #
345
+ # @return [Google::Apis::BloggerV3::Comment]
346
+ #
347
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
348
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
349
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
350
+ def get_comment(blog_id, post_id, comment_id, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
351
+ path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}'
352
+ command = make_simple_command(:get, path, options)
353
+ command.response_representation = Google::Apis::BloggerV3::Comment::Representation
354
+ command.response_class = Google::Apis::BloggerV3::Comment
355
+ command.params['blogId'] = blog_id unless blog_id.nil?
356
+ command.params['postId'] = post_id unless post_id.nil?
357
+ command.params['commentId'] = comment_id unless comment_id.nil?
358
+ command.query['view'] = view unless view.nil?
359
+ command.query['fields'] = fields unless fields.nil?
360
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
361
+ command.query['userIp'] = user_ip unless user_ip.nil?
362
+ execute_or_queue_command(command, &block)
363
+ end
364
+
365
+ # Retrieves the comments for a post, possibly filtered.
366
+ # @param [String] blog_id
367
+ # ID of the blog to fetch comments from.
368
+ # @param [String] post_id
369
+ # ID of the post to fetch posts from.
370
+ # @param [DateTime] end_date
371
+ # Latest date of comment to fetch, a date-time with RFC 3339 formatting.
372
+ # @param [Boolean] fetch_bodies
373
+ # Whether the body content of the comments is included.
374
+ # @param [Fixnum] max_results
375
+ # Maximum number of comments to include in the result.
376
+ # @param [String] page_token
377
+ # Continuation token if request is paged.
378
+ # @param [DateTime] start_date
379
+ # Earliest date of comment to fetch, a date-time with RFC 3339 formatting.
380
+ # @param [Array<String>, String] status
381
+ # @param [String] view
382
+ # Access level with which to view the returned result. Note that some fields
383
+ # require elevated access.
384
+ # @param [String] fields
385
+ # Selector specifying which fields to include in a partial response.
386
+ # @param [String] quota_user
387
+ # Available to use for quota purposes for server-side applications. Can be any
388
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
389
+ # Overrides userIp if both are provided.
390
+ # @param [String] user_ip
391
+ # IP address of the site where the request originates. Use this if you want to
392
+ # enforce per-user limits.
393
+ # @param [Google::Apis::RequestOptions] options
394
+ # Request-specific options
395
+ #
396
+ # @yield [result, err] Result & error if block supplied
397
+ # @yieldparam result [Google::Apis::BloggerV3::CommentList] parsed result object
398
+ # @yieldparam err [StandardError] error object if request failed
399
+ #
400
+ # @return [Google::Apis::BloggerV3::CommentList]
401
+ #
402
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
403
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
404
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
405
+ def list_comments(blog_id, post_id, end_date: nil, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
406
+ path = 'blogs/{blogId}/posts/{postId}/comments'
407
+ command = make_simple_command(:get, path, options)
408
+ command.response_representation = Google::Apis::BloggerV3::CommentList::Representation
409
+ command.response_class = Google::Apis::BloggerV3::CommentList
410
+ command.params['blogId'] = blog_id unless blog_id.nil?
411
+ command.params['postId'] = post_id unless post_id.nil?
412
+ command.query['endDate'] = end_date unless end_date.nil?
413
+ command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
414
+ command.query['maxResults'] = max_results unless max_results.nil?
415
+ command.query['pageToken'] = page_token unless page_token.nil?
416
+ command.query['startDate'] = start_date unless start_date.nil?
417
+ command.query['status'] = status unless status.nil?
418
+ command.query['view'] = view unless view.nil?
419
+ command.query['fields'] = fields unless fields.nil?
420
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
421
+ command.query['userIp'] = user_ip unless user_ip.nil?
422
+ execute_or_queue_command(command, &block)
423
+ end
424
+
425
+ # Retrieves the comments for a blog, across all posts, possibly filtered.
426
+ # @param [String] blog_id
427
+ # ID of the blog to fetch comments from.
428
+ # @param [DateTime] end_date
429
+ # Latest date of comment to fetch, a date-time with RFC 3339 formatting.
430
+ # @param [Boolean] fetch_bodies
431
+ # Whether the body content of the comments is included.
432
+ # @param [Fixnum] max_results
433
+ # Maximum number of comments to include in the result.
434
+ # @param [String] page_token
435
+ # Continuation token if request is paged.
436
+ # @param [DateTime] start_date
437
+ # Earliest date of comment to fetch, a date-time with RFC 3339 formatting.
438
+ # @param [Array<String>, String] status
439
+ # @param [String] fields
440
+ # Selector specifying which fields to include in a partial response.
441
+ # @param [String] quota_user
442
+ # Available to use for quota purposes for server-side applications. Can be any
443
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
444
+ # Overrides userIp if both are provided.
445
+ # @param [String] user_ip
446
+ # IP address of the site where the request originates. Use this if you want to
447
+ # enforce per-user limits.
448
+ # @param [Google::Apis::RequestOptions] options
449
+ # Request-specific options
450
+ #
451
+ # @yield [result, err] Result & error if block supplied
452
+ # @yieldparam result [Google::Apis::BloggerV3::CommentList] parsed result object
453
+ # @yieldparam err [StandardError] error object if request failed
454
+ #
455
+ # @return [Google::Apis::BloggerV3::CommentList]
456
+ #
457
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
458
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
459
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
460
+ def list_comments_by_blog(blog_id, end_date: nil, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
461
+ path = 'blogs/{blogId}/comments'
462
+ command = make_simple_command(:get, path, options)
463
+ command.response_representation = Google::Apis::BloggerV3::CommentList::Representation
464
+ command.response_class = Google::Apis::BloggerV3::CommentList
465
+ command.params['blogId'] = blog_id unless blog_id.nil?
466
+ command.query['endDate'] = end_date unless end_date.nil?
467
+ command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
468
+ command.query['maxResults'] = max_results unless max_results.nil?
469
+ command.query['pageToken'] = page_token unless page_token.nil?
470
+ command.query['startDate'] = start_date unless start_date.nil?
471
+ command.query['status'] = status unless status.nil?
472
+ command.query['fields'] = fields unless fields.nil?
473
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
474
+ command.query['userIp'] = user_ip unless user_ip.nil?
475
+ execute_or_queue_command(command, &block)
476
+ end
477
+
478
+ # Marks a comment as spam.
479
+ # @param [String] blog_id
480
+ # The ID of the Blog.
481
+ # @param [String] post_id
482
+ # The ID of the Post.
483
+ # @param [String] comment_id
484
+ # The ID of the comment to mark as spam.
485
+ # @param [String] fields
486
+ # Selector specifying which fields to include in a partial response.
487
+ # @param [String] quota_user
488
+ # Available to use for quota purposes for server-side applications. Can be any
489
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
490
+ # Overrides userIp if both are provided.
491
+ # @param [String] user_ip
492
+ # IP address of the site where the request originates. Use this if you want to
493
+ # enforce per-user limits.
494
+ # @param [Google::Apis::RequestOptions] options
495
+ # Request-specific options
496
+ #
497
+ # @yield [result, err] Result & error if block supplied
498
+ # @yieldparam result [Google::Apis::BloggerV3::Comment] parsed result object
499
+ # @yieldparam err [StandardError] error object if request failed
500
+ #
501
+ # @return [Google::Apis::BloggerV3::Comment]
502
+ #
503
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
504
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
505
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
506
+ def mark_comment_as_spam(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
507
+ path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}/spam'
508
+ command = make_simple_command(:post, path, options)
509
+ command.response_representation = Google::Apis::BloggerV3::Comment::Representation
510
+ command.response_class = Google::Apis::BloggerV3::Comment
511
+ command.params['blogId'] = blog_id unless blog_id.nil?
512
+ command.params['postId'] = post_id unless post_id.nil?
513
+ command.params['commentId'] = comment_id unless comment_id.nil?
514
+ command.query['fields'] = fields unless fields.nil?
515
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
516
+ command.query['userIp'] = user_ip unless user_ip.nil?
517
+ execute_or_queue_command(command, &block)
518
+ end
519
+
520
+ # Removes the content of a comment.
521
+ # @param [String] blog_id
522
+ # The ID of the Blog.
523
+ # @param [String] post_id
524
+ # The ID of the Post.
525
+ # @param [String] comment_id
526
+ # The ID of the comment to delete content from.
527
+ # @param [String] fields
528
+ # Selector specifying which fields to include in a partial response.
529
+ # @param [String] quota_user
530
+ # Available to use for quota purposes for server-side applications. Can be any
531
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
532
+ # Overrides userIp if both are provided.
533
+ # @param [String] user_ip
534
+ # IP address of the site where the request originates. Use this if you want to
535
+ # enforce per-user limits.
536
+ # @param [Google::Apis::RequestOptions] options
537
+ # Request-specific options
538
+ #
539
+ # @yield [result, err] Result & error if block supplied
540
+ # @yieldparam result [Google::Apis::BloggerV3::Comment] parsed result object
541
+ # @yieldparam err [StandardError] error object if request failed
542
+ #
543
+ # @return [Google::Apis::BloggerV3::Comment]
544
+ #
545
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
546
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
547
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
548
+ def remove_comment_content(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
549
+ path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent'
550
+ command = make_simple_command(:post, path, options)
551
+ command.response_representation = Google::Apis::BloggerV3::Comment::Representation
552
+ command.response_class = Google::Apis::BloggerV3::Comment
553
+ command.params['blogId'] = blog_id unless blog_id.nil?
554
+ command.params['postId'] = post_id unless post_id.nil?
555
+ command.params['commentId'] = comment_id unless comment_id.nil?
556
+ command.query['fields'] = fields unless fields.nil?
557
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
558
+ command.query['userIp'] = user_ip unless user_ip.nil?
559
+ execute_or_queue_command(command, &block)
560
+ end
561
+
562
+ # Retrieve pageview stats for a Blog.
563
+ # @param [String] blog_id
564
+ # The ID of the blog to get.
565
+ # @param [Array<String>, String] range
566
+ # @param [String] fields
567
+ # Selector specifying which fields to include in a partial response.
568
+ # @param [String] quota_user
569
+ # Available to use for quota purposes for server-side applications. Can be any
570
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
571
+ # Overrides userIp if both are provided.
572
+ # @param [String] user_ip
573
+ # IP address of the site where the request originates. Use this if you want to
574
+ # enforce per-user limits.
575
+ # @param [Google::Apis::RequestOptions] options
576
+ # Request-specific options
577
+ #
578
+ # @yield [result, err] Result & error if block supplied
579
+ # @yieldparam result [Google::Apis::BloggerV3::Pageviews] parsed result object
580
+ # @yieldparam err [StandardError] error object if request failed
581
+ #
582
+ # @return [Google::Apis::BloggerV3::Pageviews]
583
+ #
584
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
585
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
586
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
587
+ def get_page_view(blog_id, range: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
588
+ path = 'blogs/{blogId}/pageviews'
589
+ command = make_simple_command(:get, path, options)
590
+ command.response_representation = Google::Apis::BloggerV3::Pageviews::Representation
591
+ command.response_class = Google::Apis::BloggerV3::Pageviews
592
+ command.params['blogId'] = blog_id unless blog_id.nil?
593
+ command.query['range'] = range unless range.nil?
594
+ command.query['fields'] = fields unless fields.nil?
595
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
596
+ command.query['userIp'] = user_ip unless user_ip.nil?
597
+ execute_or_queue_command(command, &block)
598
+ end
599
+
600
+ # Delete a page by ID.
601
+ # @param [String] blog_id
602
+ # The ID of the Blog.
603
+ # @param [String] page_id
604
+ # The ID of the Page.
605
+ # @param [String] fields
606
+ # Selector specifying which fields to include in a partial response.
607
+ # @param [String] quota_user
608
+ # Available to use for quota purposes for server-side applications. Can be any
609
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
610
+ # Overrides userIp if both are provided.
611
+ # @param [String] user_ip
612
+ # IP address of the site where the request originates. Use this if you want to
613
+ # enforce per-user limits.
614
+ # @param [Google::Apis::RequestOptions] options
615
+ # Request-specific options
616
+ #
617
+ # @yield [result, err] Result & error if block supplied
618
+ # @yieldparam result [NilClass] No result returned for this method
619
+ # @yieldparam err [StandardError] error object if request failed
620
+ #
621
+ # @return [void]
622
+ #
623
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
624
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
625
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
626
+ def delete_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
627
+ path = 'blogs/{blogId}/pages/{pageId}'
628
+ command = make_simple_command(:delete, path, options)
629
+ command.params['blogId'] = blog_id unless blog_id.nil?
630
+ command.params['pageId'] = page_id unless page_id.nil?
631
+ command.query['fields'] = fields unless fields.nil?
632
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
633
+ command.query['userIp'] = user_ip unless user_ip.nil?
634
+ execute_or_queue_command(command, &block)
635
+ end
636
+
637
+ # Gets one blog page by ID.
638
+ # @param [String] blog_id
639
+ # ID of the blog containing the page.
640
+ # @param [String] page_id
641
+ # The ID of the page to get.
642
+ # @param [String] view
643
+ # @param [String] fields
644
+ # Selector specifying which fields to include in a partial response.
645
+ # @param [String] quota_user
646
+ # Available to use for quota purposes for server-side applications. Can be any
647
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
648
+ # Overrides userIp if both are provided.
649
+ # @param [String] user_ip
650
+ # IP address of the site where the request originates. Use this if you want to
651
+ # enforce per-user limits.
652
+ # @param [Google::Apis::RequestOptions] options
653
+ # Request-specific options
654
+ #
655
+ # @yield [result, err] Result & error if block supplied
656
+ # @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
657
+ # @yieldparam err [StandardError] error object if request failed
658
+ #
659
+ # @return [Google::Apis::BloggerV3::Page]
660
+ #
661
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
662
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
663
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
664
+ def get_page(blog_id, page_id, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
665
+ path = 'blogs/{blogId}/pages/{pageId}'
666
+ command = make_simple_command(:get, path, options)
667
+ command.response_representation = Google::Apis::BloggerV3::Page::Representation
668
+ command.response_class = Google::Apis::BloggerV3::Page
669
+ command.params['blogId'] = blog_id unless blog_id.nil?
670
+ command.params['pageId'] = page_id unless page_id.nil?
671
+ command.query['view'] = view unless view.nil?
672
+ command.query['fields'] = fields unless fields.nil?
673
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
674
+ command.query['userIp'] = user_ip unless user_ip.nil?
675
+ execute_or_queue_command(command, &block)
676
+ end
677
+
678
+ # Add a page.
679
+ # @param [String] blog_id
680
+ # ID of the blog to add the page to.
681
+ # @param [Google::Apis::BloggerV3::Page] page_object
682
+ # @param [Boolean] is_draft
683
+ # Whether to create the page as a draft (default: false).
684
+ # @param [String] fields
685
+ # Selector specifying which fields to include in a partial response.
686
+ # @param [String] quota_user
687
+ # Available to use for quota purposes for server-side applications. Can be any
688
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
689
+ # Overrides userIp if both are provided.
690
+ # @param [String] user_ip
691
+ # IP address of the site where the request originates. Use this if you want to
692
+ # enforce per-user limits.
693
+ # @param [Google::Apis::RequestOptions] options
694
+ # Request-specific options
695
+ #
696
+ # @yield [result, err] Result & error if block supplied
697
+ # @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
698
+ # @yieldparam err [StandardError] error object if request failed
699
+ #
700
+ # @return [Google::Apis::BloggerV3::Page]
701
+ #
702
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
703
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
704
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
705
+ def insert_page(blog_id, page_object = nil, is_draft: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
706
+ path = 'blogs/{blogId}/pages'
707
+ command = make_simple_command(:post, path, options)
708
+ command.request_representation = Google::Apis::BloggerV3::Page::Representation
709
+ command.request_object = page_object
710
+ command.response_representation = Google::Apis::BloggerV3::Page::Representation
711
+ command.response_class = Google::Apis::BloggerV3::Page
712
+ command.params['blogId'] = blog_id unless blog_id.nil?
713
+ command.query['isDraft'] = is_draft unless is_draft.nil?
714
+ command.query['fields'] = fields unless fields.nil?
715
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
716
+ command.query['userIp'] = user_ip unless user_ip.nil?
717
+ execute_or_queue_command(command, &block)
718
+ end
719
+
720
+ # Retrieves the pages for a blog, optionally including non-LIVE statuses.
721
+ # @param [String] blog_id
722
+ # ID of the blog to fetch Pages from.
723
+ # @param [Boolean] fetch_bodies
724
+ # Whether to retrieve the Page bodies.
725
+ # @param [Fixnum] max_results
726
+ # Maximum number of Pages to fetch.
727
+ # @param [String] page_token
728
+ # Continuation token if the request is paged.
729
+ # @param [Array<String>, String] status
730
+ # @param [String] view
731
+ # Access level with which to view the returned result. Note that some fields
732
+ # require elevated access.
733
+ # @param [String] fields
734
+ # Selector specifying which fields to include in a partial response.
735
+ # @param [String] quota_user
736
+ # Available to use for quota purposes for server-side applications. Can be any
737
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
738
+ # Overrides userIp if both are provided.
739
+ # @param [String] user_ip
740
+ # IP address of the site where the request originates. Use this if you want to
741
+ # enforce per-user limits.
742
+ # @param [Google::Apis::RequestOptions] options
743
+ # Request-specific options
744
+ #
745
+ # @yield [result, err] Result & error if block supplied
746
+ # @yieldparam result [Google::Apis::BloggerV3::PageList] parsed result object
747
+ # @yieldparam err [StandardError] error object if request failed
748
+ #
749
+ # @return [Google::Apis::BloggerV3::PageList]
750
+ #
751
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
752
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
753
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
754
+ def list_pages(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
755
+ path = 'blogs/{blogId}/pages'
756
+ command = make_simple_command(:get, path, options)
757
+ command.response_representation = Google::Apis::BloggerV3::PageList::Representation
758
+ command.response_class = Google::Apis::BloggerV3::PageList
759
+ command.params['blogId'] = blog_id unless blog_id.nil?
760
+ command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
761
+ command.query['maxResults'] = max_results unless max_results.nil?
762
+ command.query['pageToken'] = page_token unless page_token.nil?
763
+ command.query['status'] = status unless status.nil?
764
+ command.query['view'] = view unless view.nil?
765
+ command.query['fields'] = fields unless fields.nil?
766
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
767
+ command.query['userIp'] = user_ip unless user_ip.nil?
768
+ execute_or_queue_command(command, &block)
769
+ end
770
+
771
+ # Update a page. This method supports patch semantics.
772
+ # @param [String] blog_id
773
+ # The ID of the Blog.
774
+ # @param [String] page_id
775
+ # The ID of the Page.
776
+ # @param [Google::Apis::BloggerV3::Page] page_object
777
+ # @param [Boolean] publish
778
+ # Whether a publish action should be performed when the page is updated (default:
779
+ # false).
780
+ # @param [Boolean] revert
781
+ # Whether a revert action should be performed when the page is updated (default:
782
+ # false).
783
+ # @param [String] fields
784
+ # Selector specifying which fields to include in a partial response.
785
+ # @param [String] quota_user
786
+ # Available to use for quota purposes for server-side applications. Can be any
787
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
788
+ # Overrides userIp if both are provided.
789
+ # @param [String] user_ip
790
+ # IP address of the site where the request originates. Use this if you want to
791
+ # enforce per-user limits.
792
+ # @param [Google::Apis::RequestOptions] options
793
+ # Request-specific options
794
+ #
795
+ # @yield [result, err] Result & error if block supplied
796
+ # @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
797
+ # @yieldparam err [StandardError] error object if request failed
798
+ #
799
+ # @return [Google::Apis::BloggerV3::Page]
800
+ #
801
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
802
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
803
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
804
+ def patch_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
805
+ path = 'blogs/{blogId}/pages/{pageId}'
806
+ command = make_simple_command(:patch, path, options)
807
+ command.request_representation = Google::Apis::BloggerV3::Page::Representation
808
+ command.request_object = page_object
809
+ command.response_representation = Google::Apis::BloggerV3::Page::Representation
810
+ command.response_class = Google::Apis::BloggerV3::Page
811
+ command.params['blogId'] = blog_id unless blog_id.nil?
812
+ command.params['pageId'] = page_id unless page_id.nil?
813
+ command.query['publish'] = publish unless publish.nil?
814
+ command.query['revert'] = revert unless revert.nil?
815
+ command.query['fields'] = fields unless fields.nil?
816
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
817
+ command.query['userIp'] = user_ip unless user_ip.nil?
818
+ execute_or_queue_command(command, &block)
819
+ end
820
+
821
+ # Publishes a draft page.
822
+ # @param [String] blog_id
823
+ # The ID of the blog.
824
+ # @param [String] page_id
825
+ # The ID of the page.
826
+ # @param [String] fields
827
+ # Selector specifying which fields to include in a partial response.
828
+ # @param [String] quota_user
829
+ # Available to use for quota purposes for server-side applications. Can be any
830
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
831
+ # Overrides userIp if both are provided.
832
+ # @param [String] user_ip
833
+ # IP address of the site where the request originates. Use this if you want to
834
+ # enforce per-user limits.
835
+ # @param [Google::Apis::RequestOptions] options
836
+ # Request-specific options
837
+ #
838
+ # @yield [result, err] Result & error if block supplied
839
+ # @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
840
+ # @yieldparam err [StandardError] error object if request failed
841
+ #
842
+ # @return [Google::Apis::BloggerV3::Page]
843
+ #
844
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
845
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
846
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
847
+ def publish_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
848
+ path = 'blogs/{blogId}/pages/{pageId}/publish'
849
+ command = make_simple_command(:post, path, options)
850
+ command.response_representation = Google::Apis::BloggerV3::Page::Representation
851
+ command.response_class = Google::Apis::BloggerV3::Page
852
+ command.params['blogId'] = blog_id unless blog_id.nil?
853
+ command.params['pageId'] = page_id unless page_id.nil?
854
+ command.query['fields'] = fields unless fields.nil?
855
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
856
+ command.query['userIp'] = user_ip unless user_ip.nil?
857
+ execute_or_queue_command(command, &block)
858
+ end
859
+
860
+ # Revert a published or scheduled page to draft state.
861
+ # @param [String] blog_id
862
+ # The ID of the blog.
863
+ # @param [String] page_id
864
+ # The ID of the page.
865
+ # @param [String] fields
866
+ # Selector specifying which fields to include in a partial response.
867
+ # @param [String] quota_user
868
+ # Available to use for quota purposes for server-side applications. Can be any
869
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
870
+ # Overrides userIp if both are provided.
871
+ # @param [String] user_ip
872
+ # IP address of the site where the request originates. Use this if you want to
873
+ # enforce per-user limits.
874
+ # @param [Google::Apis::RequestOptions] options
875
+ # Request-specific options
876
+ #
877
+ # @yield [result, err] Result & error if block supplied
878
+ # @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
879
+ # @yieldparam err [StandardError] error object if request failed
880
+ #
881
+ # @return [Google::Apis::BloggerV3::Page]
882
+ #
883
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
884
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
885
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
886
+ def revert_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
887
+ path = 'blogs/{blogId}/pages/{pageId}/revert'
888
+ command = make_simple_command(:post, path, options)
889
+ command.response_representation = Google::Apis::BloggerV3::Page::Representation
890
+ command.response_class = Google::Apis::BloggerV3::Page
891
+ command.params['blogId'] = blog_id unless blog_id.nil?
892
+ command.params['pageId'] = page_id unless page_id.nil?
893
+ command.query['fields'] = fields unless fields.nil?
894
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
895
+ command.query['userIp'] = user_ip unless user_ip.nil?
896
+ execute_or_queue_command(command, &block)
897
+ end
898
+
899
+ # Update a page.
900
+ # @param [String] blog_id
901
+ # The ID of the Blog.
902
+ # @param [String] page_id
903
+ # The ID of the Page.
904
+ # @param [Google::Apis::BloggerV3::Page] page_object
905
+ # @param [Boolean] publish
906
+ # Whether a publish action should be performed when the page is updated (default:
907
+ # false).
908
+ # @param [Boolean] revert
909
+ # Whether a revert action should be performed when the page is updated (default:
910
+ # false).
911
+ # @param [String] fields
912
+ # Selector specifying which fields to include in a partial response.
913
+ # @param [String] quota_user
914
+ # Available to use for quota purposes for server-side applications. Can be any
915
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
916
+ # Overrides userIp if both are provided.
917
+ # @param [String] user_ip
918
+ # IP address of the site where the request originates. Use this if you want to
919
+ # enforce per-user limits.
920
+ # @param [Google::Apis::RequestOptions] options
921
+ # Request-specific options
922
+ #
923
+ # @yield [result, err] Result & error if block supplied
924
+ # @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
925
+ # @yieldparam err [StandardError] error object if request failed
926
+ #
927
+ # @return [Google::Apis::BloggerV3::Page]
928
+ #
929
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
930
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
931
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
932
+ def update_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
933
+ path = 'blogs/{blogId}/pages/{pageId}'
934
+ command = make_simple_command(:put, path, options)
935
+ command.request_representation = Google::Apis::BloggerV3::Page::Representation
936
+ command.request_object = page_object
937
+ command.response_representation = Google::Apis::BloggerV3::Page::Representation
938
+ command.response_class = Google::Apis::BloggerV3::Page
939
+ command.params['blogId'] = blog_id unless blog_id.nil?
940
+ command.params['pageId'] = page_id unless page_id.nil?
941
+ command.query['publish'] = publish unless publish.nil?
942
+ command.query['revert'] = revert unless revert.nil?
943
+ command.query['fields'] = fields unless fields.nil?
944
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
945
+ command.query['userIp'] = user_ip unless user_ip.nil?
946
+ execute_or_queue_command(command, &block)
947
+ end
948
+
949
+ # Gets one post and user info pair, by post ID and user ID. The post user info
950
+ # contains per-user information about the post, such as access rights, specific
951
+ # to the user.
952
+ # @param [String] user_id
953
+ # ID of the user for the per-user information to be fetched. Either the word '
954
+ # self' (sans quote marks) or the user's profile identifier.
955
+ # @param [String] blog_id
956
+ # The ID of the blog.
957
+ # @param [String] post_id
958
+ # The ID of the post to get.
959
+ # @param [Fixnum] max_comments
960
+ # Maximum number of comments to pull back on a post.
961
+ # @param [String] fields
962
+ # Selector specifying which fields to include in a partial response.
963
+ # @param [String] quota_user
964
+ # Available to use for quota purposes for server-side applications. Can be any
965
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
966
+ # Overrides userIp if both are provided.
967
+ # @param [String] user_ip
968
+ # IP address of the site where the request originates. Use this if you want to
969
+ # enforce per-user limits.
970
+ # @param [Google::Apis::RequestOptions] options
971
+ # Request-specific options
972
+ #
973
+ # @yield [result, err] Result & error if block supplied
974
+ # @yieldparam result [Google::Apis::BloggerV3::PostUserInfo] parsed result object
975
+ # @yieldparam err [StandardError] error object if request failed
976
+ #
977
+ # @return [Google::Apis::BloggerV3::PostUserInfo]
978
+ #
979
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
980
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
981
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
982
+ def get_post_user_info(user_id, blog_id, post_id, max_comments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
983
+ path = 'users/{userId}/blogs/{blogId}/posts/{postId}'
984
+ command = make_simple_command(:get, path, options)
985
+ command.response_representation = Google::Apis::BloggerV3::PostUserInfo::Representation
986
+ command.response_class = Google::Apis::BloggerV3::PostUserInfo
987
+ command.params['userId'] = user_id unless user_id.nil?
988
+ command.params['blogId'] = blog_id unless blog_id.nil?
989
+ command.params['postId'] = post_id unless post_id.nil?
990
+ command.query['maxComments'] = max_comments unless max_comments.nil?
991
+ command.query['fields'] = fields unless fields.nil?
992
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
993
+ command.query['userIp'] = user_ip unless user_ip.nil?
994
+ execute_or_queue_command(command, &block)
995
+ end
996
+
997
+ # Retrieves a list of post and post user info pairs, possibly filtered. The post
998
+ # user info contains per-user information about the post, such as access rights,
999
+ # specific to the user.
1000
+ # @param [String] user_id
1001
+ # ID of the user for the per-user information to be fetched. Either the word '
1002
+ # self' (sans quote marks) or the user's profile identifier.
1003
+ # @param [String] blog_id
1004
+ # ID of the blog to fetch posts from.
1005
+ # @param [DateTime] end_date
1006
+ # Latest post date to fetch, a date-time with RFC 3339 formatting.
1007
+ # @param [Boolean] fetch_bodies
1008
+ # Whether the body content of posts is included. Default is false.
1009
+ # @param [String] labels
1010
+ # Comma-separated list of labels to search for.
1011
+ # @param [Fixnum] max_results
1012
+ # Maximum number of posts to fetch.
1013
+ # @param [String] order_by
1014
+ # Sort order applied to search results. Default is published.
1015
+ # @param [String] page_token
1016
+ # Continuation token if the request is paged.
1017
+ # @param [DateTime] start_date
1018
+ # Earliest post date to fetch, a date-time with RFC 3339 formatting.
1019
+ # @param [Array<String>, String] status
1020
+ # @param [String] view
1021
+ # Access level with which to view the returned result. Note that some fields
1022
+ # require elevated access.
1023
+ # @param [String] fields
1024
+ # Selector specifying which fields to include in a partial response.
1025
+ # @param [String] quota_user
1026
+ # Available to use for quota purposes for server-side applications. Can be any
1027
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1028
+ # Overrides userIp if both are provided.
1029
+ # @param [String] user_ip
1030
+ # IP address of the site where the request originates. Use this if you want to
1031
+ # enforce per-user limits.
1032
+ # @param [Google::Apis::RequestOptions] options
1033
+ # Request-specific options
1034
+ #
1035
+ # @yield [result, err] Result & error if block supplied
1036
+ # @yieldparam result [Google::Apis::BloggerV3::PostUserInfosList] parsed result object
1037
+ # @yieldparam err [StandardError] error object if request failed
1038
+ #
1039
+ # @return [Google::Apis::BloggerV3::PostUserInfosList]
1040
+ #
1041
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1042
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1043
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1044
+ def list_post_user_info(user_id, blog_id, end_date: nil, fetch_bodies: nil, labels: nil, max_results: nil, order_by: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1045
+ path = 'users/{userId}/blogs/{blogId}/posts'
1046
+ command = make_simple_command(:get, path, options)
1047
+ command.response_representation = Google::Apis::BloggerV3::PostUserInfosList::Representation
1048
+ command.response_class = Google::Apis::BloggerV3::PostUserInfosList
1049
+ command.params['userId'] = user_id unless user_id.nil?
1050
+ command.params['blogId'] = blog_id unless blog_id.nil?
1051
+ command.query['endDate'] = end_date unless end_date.nil?
1052
+ command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
1053
+ command.query['labels'] = labels unless labels.nil?
1054
+ command.query['maxResults'] = max_results unless max_results.nil?
1055
+ command.query['orderBy'] = order_by unless order_by.nil?
1056
+ command.query['pageToken'] = page_token unless page_token.nil?
1057
+ command.query['startDate'] = start_date unless start_date.nil?
1058
+ command.query['status'] = status unless status.nil?
1059
+ command.query['view'] = view unless view.nil?
1060
+ command.query['fields'] = fields unless fields.nil?
1061
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1062
+ command.query['userIp'] = user_ip unless user_ip.nil?
1063
+ execute_or_queue_command(command, &block)
1064
+ end
1065
+
1066
+ # Delete a post by ID.
1067
+ # @param [String] blog_id
1068
+ # The ID of the Blog.
1069
+ # @param [String] post_id
1070
+ # The ID of the Post.
1071
+ # @param [String] fields
1072
+ # Selector specifying which fields to include in a partial response.
1073
+ # @param [String] quota_user
1074
+ # Available to use for quota purposes for server-side applications. Can be any
1075
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1076
+ # Overrides userIp if both are provided.
1077
+ # @param [String] user_ip
1078
+ # IP address of the site where the request originates. Use this if you want to
1079
+ # enforce per-user limits.
1080
+ # @param [Google::Apis::RequestOptions] options
1081
+ # Request-specific options
1082
+ #
1083
+ # @yield [result, err] Result & error if block supplied
1084
+ # @yieldparam result [NilClass] No result returned for this method
1085
+ # @yieldparam err [StandardError] error object if request failed
1086
+ #
1087
+ # @return [void]
1088
+ #
1089
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1090
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1091
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1092
+ def delete_post(blog_id, post_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1093
+ path = 'blogs/{blogId}/posts/{postId}'
1094
+ command = make_simple_command(:delete, path, options)
1095
+ command.params['blogId'] = blog_id unless blog_id.nil?
1096
+ command.params['postId'] = post_id unless post_id.nil?
1097
+ command.query['fields'] = fields unless fields.nil?
1098
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1099
+ command.query['userIp'] = user_ip unless user_ip.nil?
1100
+ execute_or_queue_command(command, &block)
1101
+ end
1102
+
1103
+ # Get a post by ID.
1104
+ # @param [String] blog_id
1105
+ # ID of the blog to fetch the post from.
1106
+ # @param [String] post_id
1107
+ # The ID of the post
1108
+ # @param [Boolean] fetch_body
1109
+ # Whether the body content of the post is included (default: true). This should
1110
+ # be set to false when the post bodies are not required, to help minimize
1111
+ # traffic.
1112
+ # @param [Boolean] fetch_images
1113
+ # Whether image URL metadata for each post is included (default: false).
1114
+ # @param [Fixnum] max_comments
1115
+ # Maximum number of comments to pull back on a post.
1116
+ # @param [String] view
1117
+ # Access level with which to view the returned result. Note that some fields
1118
+ # require elevated access.
1119
+ # @param [String] fields
1120
+ # Selector specifying which fields to include in a partial response.
1121
+ # @param [String] quota_user
1122
+ # Available to use for quota purposes for server-side applications. Can be any
1123
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1124
+ # Overrides userIp if both are provided.
1125
+ # @param [String] user_ip
1126
+ # IP address of the site where the request originates. Use this if you want to
1127
+ # enforce per-user limits.
1128
+ # @param [Google::Apis::RequestOptions] options
1129
+ # Request-specific options
1130
+ #
1131
+ # @yield [result, err] Result & error if block supplied
1132
+ # @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
1133
+ # @yieldparam err [StandardError] error object if request failed
1134
+ #
1135
+ # @return [Google::Apis::BloggerV3::Post]
1136
+ #
1137
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1138
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1139
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1140
+ def get_post(blog_id, post_id, fetch_body: nil, fetch_images: nil, max_comments: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1141
+ path = 'blogs/{blogId}/posts/{postId}'
1142
+ command = make_simple_command(:get, path, options)
1143
+ command.response_representation = Google::Apis::BloggerV3::Post::Representation
1144
+ command.response_class = Google::Apis::BloggerV3::Post
1145
+ command.params['blogId'] = blog_id unless blog_id.nil?
1146
+ command.params['postId'] = post_id unless post_id.nil?
1147
+ command.query['fetchBody'] = fetch_body unless fetch_body.nil?
1148
+ command.query['fetchImages'] = fetch_images unless fetch_images.nil?
1149
+ command.query['maxComments'] = max_comments unless max_comments.nil?
1150
+ command.query['view'] = view unless view.nil?
1151
+ command.query['fields'] = fields unless fields.nil?
1152
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1153
+ command.query['userIp'] = user_ip unless user_ip.nil?
1154
+ execute_or_queue_command(command, &block)
1155
+ end
1156
+
1157
+ # Retrieve a Post by Path.
1158
+ # @param [String] blog_id
1159
+ # ID of the blog to fetch the post from.
1160
+ # @param [Fixnum] max_comments
1161
+ # Maximum number of comments to pull back on a post.
1162
+ # @param [String] path
1163
+ # Path of the Post to retrieve.
1164
+ # @param [String] view
1165
+ # Access level with which to view the returned result. Note that some fields
1166
+ # require elevated access.
1167
+ # @param [String] fields
1168
+ # Selector specifying which fields to include in a partial response.
1169
+ # @param [String] quota_user
1170
+ # Available to use for quota purposes for server-side applications. Can be any
1171
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1172
+ # Overrides userIp if both are provided.
1173
+ # @param [String] user_ip
1174
+ # IP address of the site where the request originates. Use this if you want to
1175
+ # enforce per-user limits.
1176
+ # @param [Google::Apis::RequestOptions] options
1177
+ # Request-specific options
1178
+ #
1179
+ # @yield [result, err] Result & error if block supplied
1180
+ # @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
1181
+ # @yieldparam err [StandardError] error object if request failed
1182
+ #
1183
+ # @return [Google::Apis::BloggerV3::Post]
1184
+ #
1185
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1186
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1187
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1188
+ def get_post_by_path(blog_id, max_comments: nil, path: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1189
+ path = 'blogs/{blogId}/posts/bypath'
1190
+ command = make_simple_command(:get, path, options)
1191
+ command.response_representation = Google::Apis::BloggerV3::Post::Representation
1192
+ command.response_class = Google::Apis::BloggerV3::Post
1193
+ command.params['blogId'] = blog_id unless blog_id.nil?
1194
+ command.query['maxComments'] = max_comments unless max_comments.nil?
1195
+ command.query['path'] = path unless path.nil?
1196
+ command.query['view'] = view unless view.nil?
1197
+ command.query['fields'] = fields unless fields.nil?
1198
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1199
+ command.query['userIp'] = user_ip unless user_ip.nil?
1200
+ execute_or_queue_command(command, &block)
1201
+ end
1202
+
1203
+ # Add a post.
1204
+ # @param [String] blog_id
1205
+ # ID of the blog to add the post to.
1206
+ # @param [Google::Apis::BloggerV3::Post] post_object
1207
+ # @param [Boolean] fetch_body
1208
+ # Whether the body content of the post is included with the result (default:
1209
+ # true).
1210
+ # @param [Boolean] fetch_images
1211
+ # Whether image URL metadata for each post is included in the returned result (
1212
+ # default: false).
1213
+ # @param [Boolean] is_draft
1214
+ # Whether to create the post as a draft (default: false).
1215
+ # @param [String] fields
1216
+ # Selector specifying which fields to include in a partial response.
1217
+ # @param [String] quota_user
1218
+ # Available to use for quota purposes for server-side applications. Can be any
1219
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1220
+ # Overrides userIp if both are provided.
1221
+ # @param [String] user_ip
1222
+ # IP address of the site where the request originates. Use this if you want to
1223
+ # enforce per-user limits.
1224
+ # @param [Google::Apis::RequestOptions] options
1225
+ # Request-specific options
1226
+ #
1227
+ # @yield [result, err] Result & error if block supplied
1228
+ # @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
1229
+ # @yieldparam err [StandardError] error object if request failed
1230
+ #
1231
+ # @return [Google::Apis::BloggerV3::Post]
1232
+ #
1233
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1234
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1235
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1236
+ def insert_post(blog_id, post_object = nil, fetch_body: nil, fetch_images: nil, is_draft: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1237
+ path = 'blogs/{blogId}/posts'
1238
+ command = make_simple_command(:post, path, options)
1239
+ command.request_representation = Google::Apis::BloggerV3::Post::Representation
1240
+ command.request_object = post_object
1241
+ command.response_representation = Google::Apis::BloggerV3::Post::Representation
1242
+ command.response_class = Google::Apis::BloggerV3::Post
1243
+ command.params['blogId'] = blog_id unless blog_id.nil?
1244
+ command.query['fetchBody'] = fetch_body unless fetch_body.nil?
1245
+ command.query['fetchImages'] = fetch_images unless fetch_images.nil?
1246
+ command.query['isDraft'] = is_draft unless is_draft.nil?
1247
+ command.query['fields'] = fields unless fields.nil?
1248
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1249
+ command.query['userIp'] = user_ip unless user_ip.nil?
1250
+ execute_or_queue_command(command, &block)
1251
+ end
1252
+
1253
+ # Retrieves a list of posts, possibly filtered.
1254
+ # @param [String] blog_id
1255
+ # ID of the blog to fetch posts from.
1256
+ # @param [DateTime] end_date
1257
+ # Latest post date to fetch, a date-time with RFC 3339 formatting.
1258
+ # @param [Boolean] fetch_bodies
1259
+ # Whether the body content of posts is included (default: true). This should be
1260
+ # set to false when the post bodies are not required, to help minimize traffic.
1261
+ # @param [Boolean] fetch_images
1262
+ # Whether image URL metadata for each post is included.
1263
+ # @param [String] labels
1264
+ # Comma-separated list of labels to search for.
1265
+ # @param [Fixnum] max_results
1266
+ # Maximum number of posts to fetch.
1267
+ # @param [String] order_by
1268
+ # Sort search results
1269
+ # @param [String] page_token
1270
+ # Continuation token if the request is paged.
1271
+ # @param [DateTime] start_date
1272
+ # Earliest post date to fetch, a date-time with RFC 3339 formatting.
1273
+ # @param [Array<String>, String] status
1274
+ # Statuses to include in the results.
1275
+ # @param [String] view
1276
+ # Access level with which to view the returned result. Note that some fields
1277
+ # require escalated access.
1278
+ # @param [String] fields
1279
+ # Selector specifying which fields to include in a partial response.
1280
+ # @param [String] quota_user
1281
+ # Available to use for quota purposes for server-side applications. Can be any
1282
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1283
+ # Overrides userIp if both are provided.
1284
+ # @param [String] user_ip
1285
+ # IP address of the site where the request originates. Use this if you want to
1286
+ # enforce per-user limits.
1287
+ # @param [Google::Apis::RequestOptions] options
1288
+ # Request-specific options
1289
+ #
1290
+ # @yield [result, err] Result & error if block supplied
1291
+ # @yieldparam result [Google::Apis::BloggerV3::PostList] parsed result object
1292
+ # @yieldparam err [StandardError] error object if request failed
1293
+ #
1294
+ # @return [Google::Apis::BloggerV3::PostList]
1295
+ #
1296
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1297
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1298
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1299
+ def list_posts(blog_id, end_date: nil, fetch_bodies: nil, fetch_images: nil, labels: nil, max_results: nil, order_by: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1300
+ path = 'blogs/{blogId}/posts'
1301
+ command = make_simple_command(:get, path, options)
1302
+ command.response_representation = Google::Apis::BloggerV3::PostList::Representation
1303
+ command.response_class = Google::Apis::BloggerV3::PostList
1304
+ command.params['blogId'] = blog_id unless blog_id.nil?
1305
+ command.query['endDate'] = end_date unless end_date.nil?
1306
+ command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
1307
+ command.query['fetchImages'] = fetch_images unless fetch_images.nil?
1308
+ command.query['labels'] = labels unless labels.nil?
1309
+ command.query['maxResults'] = max_results unless max_results.nil?
1310
+ command.query['orderBy'] = order_by unless order_by.nil?
1311
+ command.query['pageToken'] = page_token unless page_token.nil?
1312
+ command.query['startDate'] = start_date unless start_date.nil?
1313
+ command.query['status'] = status unless status.nil?
1314
+ command.query['view'] = view unless view.nil?
1315
+ command.query['fields'] = fields unless fields.nil?
1316
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1317
+ command.query['userIp'] = user_ip unless user_ip.nil?
1318
+ execute_or_queue_command(command, &block)
1319
+ end
1320
+
1321
+ # Update a post. This method supports patch semantics.
1322
+ # @param [String] blog_id
1323
+ # The ID of the Blog.
1324
+ # @param [String] post_id
1325
+ # The ID of the Post.
1326
+ # @param [Google::Apis::BloggerV3::Post] post_object
1327
+ # @param [Boolean] fetch_body
1328
+ # Whether the body content of the post is included with the result (default:
1329
+ # true).
1330
+ # @param [Boolean] fetch_images
1331
+ # Whether image URL metadata for each post is included in the returned result (
1332
+ # default: false).
1333
+ # @param [Fixnum] max_comments
1334
+ # Maximum number of comments to retrieve with the returned post.
1335
+ # @param [Boolean] publish
1336
+ # Whether a publish action should be performed when the post is updated (default:
1337
+ # false).
1338
+ # @param [Boolean] revert
1339
+ # Whether a revert action should be performed when the post is updated (default:
1340
+ # false).
1341
+ # @param [String] fields
1342
+ # Selector specifying which fields to include in a partial response.
1343
+ # @param [String] quota_user
1344
+ # Available to use for quota purposes for server-side applications. Can be any
1345
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1346
+ # Overrides userIp if both are provided.
1347
+ # @param [String] user_ip
1348
+ # IP address of the site where the request originates. Use this if you want to
1349
+ # enforce per-user limits.
1350
+ # @param [Google::Apis::RequestOptions] options
1351
+ # Request-specific options
1352
+ #
1353
+ # @yield [result, err] Result & error if block supplied
1354
+ # @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
1355
+ # @yieldparam err [StandardError] error object if request failed
1356
+ #
1357
+ # @return [Google::Apis::BloggerV3::Post]
1358
+ #
1359
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1360
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1361
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1362
+ def patch_post(blog_id, post_id, post_object = nil, fetch_body: nil, fetch_images: nil, max_comments: nil, publish: nil, revert: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1363
+ path = 'blogs/{blogId}/posts/{postId}'
1364
+ command = make_simple_command(:patch, path, options)
1365
+ command.request_representation = Google::Apis::BloggerV3::Post::Representation
1366
+ command.request_object = post_object
1367
+ command.response_representation = Google::Apis::BloggerV3::Post::Representation
1368
+ command.response_class = Google::Apis::BloggerV3::Post
1369
+ command.params['blogId'] = blog_id unless blog_id.nil?
1370
+ command.params['postId'] = post_id unless post_id.nil?
1371
+ command.query['fetchBody'] = fetch_body unless fetch_body.nil?
1372
+ command.query['fetchImages'] = fetch_images unless fetch_images.nil?
1373
+ command.query['maxComments'] = max_comments unless max_comments.nil?
1374
+ command.query['publish'] = publish unless publish.nil?
1375
+ command.query['revert'] = revert unless revert.nil?
1376
+ command.query['fields'] = fields unless fields.nil?
1377
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1378
+ command.query['userIp'] = user_ip unless user_ip.nil?
1379
+ execute_or_queue_command(command, &block)
1380
+ end
1381
+
1382
+ # Publishes a draft post, optionally at the specific time of the given
1383
+ # publishDate parameter.
1384
+ # @param [String] blog_id
1385
+ # The ID of the Blog.
1386
+ # @param [String] post_id
1387
+ # The ID of the Post.
1388
+ # @param [DateTime] publish_date
1389
+ # Optional date and time to schedule the publishing of the Blog. If no
1390
+ # publishDate parameter is given, the post is either published at the a
1391
+ # previously saved schedule date (if present), or the current time. If a future
1392
+ # date is given, the post will be scheduled to be published.
1393
+ # @param [String] fields
1394
+ # Selector specifying which fields to include in a partial response.
1395
+ # @param [String] quota_user
1396
+ # Available to use for quota purposes for server-side applications. Can be any
1397
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1398
+ # Overrides userIp if both are provided.
1399
+ # @param [String] user_ip
1400
+ # IP address of the site where the request originates. Use this if you want to
1401
+ # enforce per-user limits.
1402
+ # @param [Google::Apis::RequestOptions] options
1403
+ # Request-specific options
1404
+ #
1405
+ # @yield [result, err] Result & error if block supplied
1406
+ # @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
1407
+ # @yieldparam err [StandardError] error object if request failed
1408
+ #
1409
+ # @return [Google::Apis::BloggerV3::Post]
1410
+ #
1411
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1412
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1413
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1414
+ def publish_post(blog_id, post_id, publish_date: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1415
+ path = 'blogs/{blogId}/posts/{postId}/publish'
1416
+ command = make_simple_command(:post, path, options)
1417
+ command.response_representation = Google::Apis::BloggerV3::Post::Representation
1418
+ command.response_class = Google::Apis::BloggerV3::Post
1419
+ command.params['blogId'] = blog_id unless blog_id.nil?
1420
+ command.params['postId'] = post_id unless post_id.nil?
1421
+ command.query['publishDate'] = publish_date unless publish_date.nil?
1422
+ command.query['fields'] = fields unless fields.nil?
1423
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1424
+ command.query['userIp'] = user_ip unless user_ip.nil?
1425
+ execute_or_queue_command(command, &block)
1426
+ end
1427
+
1428
+ # Revert a published or scheduled post to draft state.
1429
+ # @param [String] blog_id
1430
+ # The ID of the Blog.
1431
+ # @param [String] post_id
1432
+ # The ID of the Post.
1433
+ # @param [String] fields
1434
+ # Selector specifying which fields to include in a partial response.
1435
+ # @param [String] quota_user
1436
+ # Available to use for quota purposes for server-side applications. Can be any
1437
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1438
+ # Overrides userIp if both are provided.
1439
+ # @param [String] user_ip
1440
+ # IP address of the site where the request originates. Use this if you want to
1441
+ # enforce per-user limits.
1442
+ # @param [Google::Apis::RequestOptions] options
1443
+ # Request-specific options
1444
+ #
1445
+ # @yield [result, err] Result & error if block supplied
1446
+ # @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
1447
+ # @yieldparam err [StandardError] error object if request failed
1448
+ #
1449
+ # @return [Google::Apis::BloggerV3::Post]
1450
+ #
1451
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1452
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1453
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1454
+ def revert_post(blog_id, post_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1455
+ path = 'blogs/{blogId}/posts/{postId}/revert'
1456
+ command = make_simple_command(:post, path, options)
1457
+ command.response_representation = Google::Apis::BloggerV3::Post::Representation
1458
+ command.response_class = Google::Apis::BloggerV3::Post
1459
+ command.params['blogId'] = blog_id unless blog_id.nil?
1460
+ command.params['postId'] = post_id unless post_id.nil?
1461
+ command.query['fields'] = fields unless fields.nil?
1462
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1463
+ command.query['userIp'] = user_ip unless user_ip.nil?
1464
+ execute_or_queue_command(command, &block)
1465
+ end
1466
+
1467
+ # Search for a post.
1468
+ # @param [String] blog_id
1469
+ # ID of the blog to fetch the post from.
1470
+ # @param [Boolean] fetch_bodies
1471
+ # Whether the body content of posts is included (default: true). This should be
1472
+ # set to false when the post bodies are not required, to help minimize traffic.
1473
+ # @param [String] order_by
1474
+ # Sort search results
1475
+ # @param [String] q
1476
+ # Query terms to search this blog for matching posts.
1477
+ # @param [String] fields
1478
+ # Selector specifying which fields to include in a partial response.
1479
+ # @param [String] quota_user
1480
+ # Available to use for quota purposes for server-side applications. Can be any
1481
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1482
+ # Overrides userIp if both are provided.
1483
+ # @param [String] user_ip
1484
+ # IP address of the site where the request originates. Use this if you want to
1485
+ # enforce per-user limits.
1486
+ # @param [Google::Apis::RequestOptions] options
1487
+ # Request-specific options
1488
+ #
1489
+ # @yield [result, err] Result & error if block supplied
1490
+ # @yieldparam result [Google::Apis::BloggerV3::PostList] parsed result object
1491
+ # @yieldparam err [StandardError] error object if request failed
1492
+ #
1493
+ # @return [Google::Apis::BloggerV3::PostList]
1494
+ #
1495
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1496
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1497
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1498
+ def search_posts(blog_id, fetch_bodies: nil, order_by: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1499
+ path = 'blogs/{blogId}/posts/search'
1500
+ command = make_simple_command(:get, path, options)
1501
+ command.response_representation = Google::Apis::BloggerV3::PostList::Representation
1502
+ command.response_class = Google::Apis::BloggerV3::PostList
1503
+ command.params['blogId'] = blog_id unless blog_id.nil?
1504
+ command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
1505
+ command.query['orderBy'] = order_by unless order_by.nil?
1506
+ command.query['q'] = q unless q.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
+ # Update a post.
1514
+ # @param [String] blog_id
1515
+ # The ID of the Blog.
1516
+ # @param [String] post_id
1517
+ # The ID of the Post.
1518
+ # @param [Google::Apis::BloggerV3::Post] post_object
1519
+ # @param [Boolean] fetch_body
1520
+ # Whether the body content of the post is included with the result (default:
1521
+ # true).
1522
+ # @param [Boolean] fetch_images
1523
+ # Whether image URL metadata for each post is included in the returned result (
1524
+ # default: false).
1525
+ # @param [Fixnum] max_comments
1526
+ # Maximum number of comments to retrieve with the returned post.
1527
+ # @param [Boolean] publish
1528
+ # Whether a publish action should be performed when the post is updated (default:
1529
+ # false).
1530
+ # @param [Boolean] revert
1531
+ # Whether a revert action should be performed when the post is updated (default:
1532
+ # false).
1533
+ # @param [String] fields
1534
+ # Selector specifying which fields to include in a partial response.
1535
+ # @param [String] quota_user
1536
+ # Available to use for quota purposes for server-side applications. Can be any
1537
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1538
+ # Overrides userIp if both are provided.
1539
+ # @param [String] user_ip
1540
+ # IP address of the site where the request originates. Use this if you want to
1541
+ # enforce per-user limits.
1542
+ # @param [Google::Apis::RequestOptions] options
1543
+ # Request-specific options
1544
+ #
1545
+ # @yield [result, err] Result & error if block supplied
1546
+ # @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
1547
+ # @yieldparam err [StandardError] error object if request failed
1548
+ #
1549
+ # @return [Google::Apis::BloggerV3::Post]
1550
+ #
1551
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1552
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1553
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1554
+ def update_post(blog_id, post_id, post_object = nil, fetch_body: nil, fetch_images: nil, max_comments: nil, publish: nil, revert: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1555
+ path = 'blogs/{blogId}/posts/{postId}'
1556
+ command = make_simple_command(:put, path, options)
1557
+ command.request_representation = Google::Apis::BloggerV3::Post::Representation
1558
+ command.request_object = post_object
1559
+ command.response_representation = Google::Apis::BloggerV3::Post::Representation
1560
+ command.response_class = Google::Apis::BloggerV3::Post
1561
+ command.params['blogId'] = blog_id unless blog_id.nil?
1562
+ command.params['postId'] = post_id unless post_id.nil?
1563
+ command.query['fetchBody'] = fetch_body unless fetch_body.nil?
1564
+ command.query['fetchImages'] = fetch_images unless fetch_images.nil?
1565
+ command.query['maxComments'] = max_comments unless max_comments.nil?
1566
+ command.query['publish'] = publish unless publish.nil?
1567
+ command.query['revert'] = revert unless revert.nil?
1568
+ command.query['fields'] = fields unless fields.nil?
1569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1570
+ command.query['userIp'] = user_ip unless user_ip.nil?
1571
+ execute_or_queue_command(command, &block)
1572
+ end
1573
+
1574
+ # Gets one user by ID.
1575
+ # @param [String] user_id
1576
+ # The ID of the user to get.
1577
+ # @param [String] fields
1578
+ # Selector specifying which fields to include in a partial response.
1579
+ # @param [String] quota_user
1580
+ # Available to use for quota purposes for server-side applications. Can be any
1581
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1582
+ # Overrides userIp if both are provided.
1583
+ # @param [String] user_ip
1584
+ # IP address of the site where the request originates. Use this if you want to
1585
+ # enforce per-user limits.
1586
+ # @param [Google::Apis::RequestOptions] options
1587
+ # Request-specific options
1588
+ #
1589
+ # @yield [result, err] Result & error if block supplied
1590
+ # @yieldparam result [Google::Apis::BloggerV3::User] parsed result object
1591
+ # @yieldparam err [StandardError] error object if request failed
1592
+ #
1593
+ # @return [Google::Apis::BloggerV3::User]
1594
+ #
1595
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1596
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1597
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1598
+ def get_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1599
+ path = 'users/{userId}'
1600
+ command = make_simple_command(:get, path, options)
1601
+ command.response_representation = Google::Apis::BloggerV3::User::Representation
1602
+ command.response_class = Google::Apis::BloggerV3::User
1603
+ command.params['userId'] = user_id unless user_id.nil?
1604
+ command.query['fields'] = fields unless fields.nil?
1605
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1606
+ command.query['userIp'] = user_ip unless user_ip.nil?
1607
+ execute_or_queue_command(command, &block)
1608
+ end
1609
+
1610
+ protected
1611
+
1612
+ def apply_command_defaults(command)
1613
+ command.query['key'] = key unless key.nil?
1614
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1615
+ command.query['userIp'] = user_ip unless user_ip.nil?
1616
+ end
1617
+ end
1618
+ end
1619
+ end
1620
+ end