google-api-client 0.8.6 → 0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +22 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +41 -2
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +32 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +181 -148
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +1036 -0
  15. data/api_names_out.yaml +26053 -0
  16. data/bin/generate-api +95 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +668 -0
  25. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  26. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  27. data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
  28. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  29. data/generated/google/apis/admin_directory_v1.rb +113 -0
  30. data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
  31. data/generated/google/apis/admin_directory_v1/representations.rb +1029 -0
  32. data/generated/google/apis/admin_directory_v1/service.rb +3818 -0
  33. data/generated/google/apis/admin_reports_v1.rb +38 -0
  34. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  35. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  36. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  37. data/generated/google/apis/adsense_v1_4.rb +38 -0
  38. data/generated/google/apis/adsense_v1_4/classes.rb +1285 -0
  39. data/generated/google/apis/adsense_v1_4/representations.rb +494 -0
  40. data/generated/google/apis/adsense_v1_4/service.rb +1714 -0
  41. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  42. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  43. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  44. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  45. data/generated/google/apis/analytics_v3.rb +49 -0
  46. data/generated/google/apis/analytics_v3/classes.rb +5118 -0
  47. data/generated/google/apis/analytics_v3/representations.rb +1662 -0
  48. data/generated/google/apis/analytics_v3/service.rb +3568 -0
  49. data/generated/google/apis/androidenterprise_v1.rb +35 -0
  50. data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
  51. data/generated/google/apis/androidenterprise_v1/representations.rb +538 -0
  52. data/generated/google/apis/androidenterprise_v1/service.rb +2602 -0
  53. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  54. data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
  55. data/generated/google/apis/androidpublisher_v2/representations.rb +646 -0
  56. data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
  57. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  58. data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
  59. data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
  60. data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
  61. data/generated/google/apis/appsactivity_v1.rb +46 -0
  62. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  63. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  64. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  65. data/generated/google/apis/appstate_v1.rb +34 -0
  66. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  67. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  68. data/generated/google/apis/appstate_v1/service.rb +260 -0
  69. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  70. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  71. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  72. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  73. data/generated/google/apis/bigquery_v2.rb +52 -0
  74. data/generated/google/apis/bigquery_v2/classes.rb +2471 -0
  75. data/generated/google/apis/bigquery_v2/representations.rb +816 -0
  76. data/generated/google/apis/bigquery_v2/service.rb +982 -0
  77. data/generated/google/apis/blogger_v3.rb +37 -0
  78. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  79. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  80. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  81. data/generated/google/apis/books_v1.rb +34 -0
  82. data/generated/google/apis/books_v1/classes.rb +3956 -0
  83. data/generated/google/apis/books_v1/representations.rb +1538 -0
  84. data/generated/google/apis/books_v1/service.rb +2290 -0
  85. data/generated/google/apis/calendar_v3.rb +37 -0
  86. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  87. data/generated/google/apis/calendar_v3/representations.rb +567 -0
  88. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  89. data/{lib/google/api_client/service_account.rb → generated/google/apis/civicinfo_v2.rb} +18 -8
  90. data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
  91. data/generated/google/apis/civicinfo_v2/representations.rb +383 -0
  92. data/generated/google/apis/civicinfo_v2/service.rb +279 -0
  93. data/generated/google/apis/classroom_v1.rb +49 -0
  94. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  95. data/generated/google/apis/classroom_v1/representations.rb +217 -0
  96. data/generated/google/apis/classroom_v1/service.rb +970 -0
  97. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  98. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  99. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  100. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  101. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  102. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  103. data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
  104. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  105. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  106. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  107. data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
  108. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  109. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  110. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  111. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  112. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  113. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  114. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +437 -0
  115. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +188 -0
  116. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +623 -0
  117. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  118. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  119. data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
  120. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  121. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  122. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  123. data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
  124. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  125. data/generated/google/apis/compute_beta.rb +49 -0
  126. data/generated/google/apis/compute_beta/classes.rb +9128 -0
  127. data/generated/google/apis/compute_beta/representations.rb +3048 -0
  128. data/generated/google/apis/compute_beta/service.rb +10154 -0
  129. data/generated/google/apis/compute_v1.rb +49 -0
  130. data/generated/google/apis/compute_v1/classes.rb +8681 -0
  131. data/generated/google/apis/compute_v1/representations.rb +2895 -0
  132. data/generated/google/apis/compute_v1/service.rb +9252 -0
  133. data/generated/google/apis/container_v1.rb +35 -0
  134. data/generated/google/apis/container_v1/classes.rb +463 -0
  135. data/generated/google/apis/container_v1/representations.rb +175 -0
  136. data/generated/google/apis/container_v1/service.rb +367 -0
  137. data/generated/google/apis/container_v1beta1.rb +35 -0
  138. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  139. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  140. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  141. data/generated/google/apis/content_v2.rb +35 -0
  142. data/generated/google/apis/content_v2/classes.rb +5986 -0
  143. data/generated/google/apis/content_v2/representations.rb +2288 -0
  144. data/generated/google/apis/content_v2/service.rb +2338 -0
  145. data/generated/google/apis/coordinate_v1.rb +37 -0
  146. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  147. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  148. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  149. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  150. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  151. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  152. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  153. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  154. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  155. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  156. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  157. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  158. data/generated/google/apis/deploymentmanager_v2/classes.rb +1091 -0
  159. data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
  160. data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
  161. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  162. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  163. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  164. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  165. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  166. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  167. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  168. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  169. data/generated/google/apis/discovery_v1.rb +32 -0
  170. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  171. data/generated/google/apis/discovery_v1/representations.rb +357 -0
  172. data/generated/google/apis/discovery_v1/service.rb +142 -0
  173. data/generated/google/apis/dns_v1.rb +44 -0
  174. data/generated/google/apis/dns_v1/classes.rb +406 -0
  175. data/generated/google/apis/dns_v1/representations.rb +151 -0
  176. data/generated/google/apis/dns_v1/service.rb +454 -0
  177. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  178. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +716 -0
  179. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +298 -0
  180. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +341 -0
  181. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  182. data/generated/google/apis/doubleclicksearch_v2/classes.rb +956 -0
  183. data/generated/google/apis/doubleclicksearch_v2/representations.rb +316 -0
  184. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  185. data/generated/google/apis/drive_v2.rb +58 -0
  186. data/generated/google/apis/drive_v2/classes.rb +2562 -0
  187. data/generated/google/apis/drive_v2/representations.rb +795 -0
  188. data/generated/google/apis/drive_v2/service.rb +2696 -0
  189. data/generated/google/apis/drive_v3.rb +55 -0
  190. data/generated/google/apis/drive_v3/classes.rb +1534 -0
  191. data/generated/google/apis/drive_v3/representations.rb +497 -0
  192. data/generated/google/apis/drive_v3/service.rb +1541 -0
  193. data/generated/google/apis/fitness_v1.rb +49 -0
  194. data/generated/google/apis/fitness_v1/classes.rb +885 -0
  195. data/generated/google/apis/fitness_v1/representations.rb +320 -0
  196. data/generated/google/apis/fitness_v1/service.rb +675 -0
  197. data/generated/google/apis/fusiontables_v2.rb +37 -0
  198. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  199. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  200. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  201. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  202. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  203. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  204. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  205. data/generated/google/apis/games_management_v1management.rb +37 -0
  206. data/generated/google/apis/games_management_v1management/classes.rb +524 -0
  207. data/generated/google/apis/games_management_v1management/representations.rb +231 -0
  208. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  209. data/generated/google/apis/games_v1.rb +40 -0
  210. data/generated/google/apis/games_v1/classes.rb +4617 -0
  211. data/generated/google/apis/games_v1/representations.rb +1584 -0
  212. data/generated/google/apis/games_v1/service.rb +2290 -0
  213. data/generated/google/apis/gan_v1beta1.rb +31 -0
  214. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  215. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  216. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  217. data/generated/google/apis/genomics_v1.rb +49 -0
  218. data/generated/google/apis/genomics_v1/classes.rb +2609 -0
  219. data/generated/google/apis/genomics_v1/representations.rb +909 -0
  220. data/generated/google/apis/genomics_v1/service.rb +1676 -0
  221. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  222. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  223. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  224. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  225. data/generated/google/apis/gmail_v1.rb +52 -0
  226. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  227. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  228. data/generated/google/apis/gmail_v1/service.rb +1470 -0
  229. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  230. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  231. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  232. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  233. data/generated/google/apis/groupssettings_v1.rb +34 -0
  234. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  235. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  236. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  237. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  238. data/generated/google/apis/identitytoolkit_v3/classes.rb +1466 -0
  239. data/generated/google/apis/identitytoolkit_v3/representations.rb +509 -0
  240. data/generated/google/apis/identitytoolkit_v3/service.rb +581 -0
  241. data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
  242. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  243. data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
  244. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  245. data/generated/google/apis/licensing_v1.rb +34 -0
  246. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  247. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  248. data/generated/google/apis/licensing_v1/service.rb +369 -0
  249. data/generated/google/apis/logging_v1beta3.rb +47 -0
  250. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  251. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  252. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  253. data/generated/google/apis/manager_v1beta2.rb +53 -0
  254. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  255. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  256. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  257. data/generated/google/apis/mapsengine_v1.rb +38 -0
  258. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  259. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  260. data/generated/google/apis/mapsengine_v1/service.rb +3388 -0
  261. data/generated/google/apis/mirror_v1.rb +37 -0
  262. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  263. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  264. data/generated/google/apis/mirror_v1/service.rb +977 -0
  265. data/generated/google/apis/oauth2_v2.rb +43 -0
  266. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  267. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  268. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  269. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  270. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  271. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  272. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  273. data/generated/google/apis/partners_v2.rb +32 -0
  274. data/generated/google/apis/partners_v2/classes.rb +942 -0
  275. data/generated/google/apis/partners_v2/representations.rb +402 -0
  276. data/generated/google/apis/partners_v2/service.rb +400 -0
  277. data/generated/google/apis/plus_domains_v1.rb +61 -0
  278. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  279. data/generated/google/apis/plus_domains_v1/representations.rb +987 -0
  280. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  281. data/generated/google/apis/plus_v1.rb +43 -0
  282. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  283. data/generated/google/apis/plus_v1/representations.rb +805 -0
  284. data/generated/google/apis/plus_v1/service.rb +470 -0
  285. data/generated/google/apis/prediction_v1_6.rb +44 -0
  286. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  287. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  288. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  289. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  290. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  291. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
  292. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  293. data/generated/google/apis/pubsub_v1.rb +37 -0
  294. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  295. data/generated/google/apis/pubsub_v1/representations.rb +281 -0
  296. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  297. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  298. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  299. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  300. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  301. data/generated/google/apis/qpx_express_v1.rb +31 -0
  302. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  303. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  304. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  305. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  306. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  307. data/generated/google/apis/replicapool_v1beta2/representations.rb +236 -0
  308. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  309. data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
  310. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  311. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +264 -0
  312. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
  313. data/generated/google/apis/reseller_v1.rb +37 -0
  314. data/generated/google/apis/reseller_v1/classes.rb +520 -0
  315. data/generated/google/apis/reseller_v1/representations.rb +200 -0
  316. data/generated/google/apis/reseller_v1/service.rb +623 -0
  317. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  318. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  319. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  320. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  321. data/generated/google/apis/script_v1.rb +61 -0
  322. data/generated/google/apis/script_v1/classes.rb +259 -0
  323. data/generated/google/apis/script_v1/representations.rb +106 -0
  324. data/generated/google/apis/script_v1/service.rb +98 -0
  325. data/generated/google/apis/site_verification_v1.rb +37 -0
  326. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  327. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  328. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  329. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  330. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2001 -0
  331. data/generated/google/apis/sqladmin_v1beta4/representations.rb +758 -0
  332. data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
  333. data/generated/google/apis/storage_v1.rb +46 -0
  334. data/generated/google/apis/storage_v1/classes.rb +1222 -0
  335. data/generated/google/apis/storage_v1/representations.rb +445 -0
  336. data/generated/google/apis/storage_v1/service.rb +1903 -0
  337. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  338. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  339. data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
  340. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  341. data/generated/google/apis/tagmanager_v1.rb +52 -0
  342. data/generated/google/apis/tagmanager_v1/classes.rb +1384 -0
  343. data/generated/google/apis/tagmanager_v1/representations.rb +515 -0
  344. data/generated/google/apis/tagmanager_v1/service.rb +1817 -0
  345. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  346. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  347. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  348. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  349. data/generated/google/apis/tasks_v1.rb +37 -0
  350. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  351. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  352. data/generated/google/apis/tasks_v1/service.rb +643 -0
  353. data/generated/google/apis/translate_v2.rb +31 -0
  354. data/generated/google/apis/translate_v2/classes.rb +168 -0
  355. data/generated/google/apis/translate_v2/representations.rb +109 -0
  356. data/generated/google/apis/translate_v2/service.rb +182 -0
  357. data/generated/google/apis/urlshortener_v1.rb +34 -0
  358. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  359. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  360. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  361. data/generated/google/apis/webmasters_v3.rb +37 -0
  362. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  363. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  364. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  365. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  366. data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
  367. data/generated/google/apis/youtube_analytics_v1/representations.rb +243 -0
  368. data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
  369. data/generated/google/apis/youtube_v3.rb +49 -0
  370. data/generated/google/apis/youtube_v3/classes.rb +8136 -0
  371. data/generated/google/apis/youtube_v3/representations.rb +2838 -0
  372. data/generated/google/apis/youtube_v3/service.rb +4403 -0
  373. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  374. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  375. data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
  376. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  377. data/google-api-client.gemspec +27 -39
  378. data/lib/google/api_client/auth/installed_app.rb +7 -5
  379. data/lib/google/api_client/auth/key_utils.rb +1 -0
  380. data/lib/google/api_client/auth/storage.rb +4 -2
  381. data/lib/google/api_client/auth/storages/file_store.rb +2 -3
  382. data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
  383. data/lib/google/api_client/client_secrets.rb +4 -5
  384. data/lib/google/apis.rb +48 -0
  385. data/lib/google/apis/core/api_command.rb +135 -0
  386. data/lib/google/apis/core/base_service.rb +317 -0
  387. data/lib/google/apis/core/batch.rb +239 -0
  388. data/lib/google/apis/core/download.rb +94 -0
  389. data/lib/google/apis/core/hashable.rb +44 -0
  390. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  391. data/lib/google/apis/core/http_command.rb +312 -0
  392. data/lib/google/apis/core/json_representation.rb +127 -0
  393. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  394. data/lib/google/apis/core/multipart.rb +187 -0
  395. data/lib/google/apis/core/upload.rb +288 -0
  396. data/lib/google/{api_client → apis}/errors.rb +39 -28
  397. data/lib/google/apis/generator.rb +70 -0
  398. data/lib/google/apis/generator/annotator.rb +295 -0
  399. data/lib/google/apis/generator/helpers.rb +74 -0
  400. data/lib/google/apis/generator/model.rb +143 -0
  401. data/lib/google/apis/generator/template.rb +124 -0
  402. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  403. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  404. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  405. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  406. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  407. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  408. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  409. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  410. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  411. data/lib/google/apis/options.rb +85 -0
  412. data/lib/google/apis/version.rb +39 -0
  413. data/rakelib/metrics.rake +22 -0
  414. data/rakelib/rubocop.rake +10 -0
  415. data/rakelib/spec.rake +11 -0
  416. data/rakelib/yard.rake +11 -0
  417. data/samples/Gemfile +7 -0
  418. data/samples/README.md +51 -0
  419. data/samples/google-api-samples +32 -0
  420. data/samples/lib/base_cli.rb +94 -0
  421. data/samples/lib/samples/analytics.rb +62 -0
  422. data/samples/lib/samples/calendar.rb +83 -0
  423. data/samples/lib/samples/drive.rb +82 -0
  424. data/samples/lib/samples/gmail.rb +50 -0
  425. data/samples/lib/samples/pubsub.rb +114 -0
  426. data/samples/lib/samples/translate.rb +44 -0
  427. data/samples/lib/samples/you_tube.rb +44 -0
  428. data/script/generate +95 -0
  429. data/script/package +8 -0
  430. data/script/release +15 -0
  431. data/spec/fixtures/files/api_names.yaml +3 -0
  432. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  433. data/spec/fixtures/files/child/.gitignore +0 -0
  434. data/spec/fixtures/files/client_secrets.json +1 -0
  435. data/spec/fixtures/files/invalid.json +1 -0
  436. data/spec/fixtures/files/test.blah +1 -0
  437. data/spec/fixtures/files/test.txt +1 -0
  438. data/spec/fixtures/files/test_api.json +440 -0
  439. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  440. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  441. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  442. data/spec/google/api_client/client_secrets_spec.rb +38 -1
  443. data/spec/google/apis/core/api_command_spec.rb +209 -0
  444. data/spec/google/apis/core/batch_spec.rb +142 -0
  445. data/spec/google/apis/core/download_spec.rb +103 -0
  446. data/spec/google/apis/core/hashable_spec.rb +60 -0
  447. data/spec/google/apis/core/http_command_spec.rb +284 -0
  448. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  449. data/spec/google/apis/core/service_spec.rb +247 -0
  450. data/spec/google/apis/core/upload_spec.rb +300 -0
  451. data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
  452. data/spec/google/apis/generator/generator_spec.rb +272 -0
  453. data/spec/google/apis/logging_spec.rb +45 -0
  454. data/spec/google/apis/options_spec.rb +40 -0
  455. data/spec/integration_tests/adsense_spec.rb +29 -0
  456. data/spec/integration_tests/drive_spec.rb +35 -0
  457. data/spec/integration_tests/pubsub_spec.rb +48 -0
  458. data/spec/integration_tests/url_shortener_spec.rb +45 -0
  459. data/spec/spec_helper.rb +131 -44
  460. data/spec/spec_helper/load_path_spec.rb +33 -0
  461. data/third_party/hurley_patches.rb +103 -0
  462. metadata +533 -170
  463. data/lib/compat/multi_json.rb +0 -19
  464. data/lib/google/api_client.rb +0 -750
  465. data/lib/google/api_client/auth/file_storage.rb +0 -59
  466. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  467. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  468. data/lib/google/api_client/batch.rb +0 -326
  469. data/lib/google/api_client/charset.rb +0 -33
  470. data/lib/google/api_client/discovery/api.rb +0 -310
  471. data/lib/google/api_client/discovery/media.rb +0 -77
  472. data/lib/google/api_client/discovery/method.rb +0 -363
  473. data/lib/google/api_client/discovery/resource.rb +0 -156
  474. data/lib/google/api_client/discovery/schema.rb +0 -117
  475. data/lib/google/api_client/environment.rb +0 -42
  476. data/lib/google/api_client/gzip.rb +0 -28
  477. data/lib/google/api_client/logging.rb +0 -32
  478. data/lib/google/api_client/media.rb +0 -259
  479. data/lib/google/api_client/railtie.rb +0 -18
  480. data/lib/google/api_client/request.rb +0 -350
  481. data/lib/google/api_client/result.rb +0 -255
  482. data/lib/google/api_client/service.rb +0 -233
  483. data/lib/google/api_client/service/batch.rb +0 -110
  484. data/lib/google/api_client/service/request.rb +0 -144
  485. data/lib/google/api_client/service/resource.rb +0 -40
  486. data/lib/google/api_client/service/result.rb +0 -162
  487. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  488. data/lib/google/api_client/service/stub_generator.rb +0 -61
  489. data/spec/google/api_client/batch_spec.rb +0 -248
  490. data/spec/google/api_client/discovery_spec.rb +0 -708
  491. data/spec/google/api_client/gzip_spec.rb +0 -98
  492. data/spec/google/api_client/media_spec.rb +0 -178
  493. data/spec/google/api_client/result_spec.rb +0 -207
  494. data/spec/google/api_client/service_account_spec.rb +0 -169
  495. data/spec/google/api_client/service_spec.rb +0 -618
  496. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  497. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,2290 @@
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 BooksV1
23
+ # Books API
24
+ #
25
+ # Lets you search for books and manage your Google Books library.
26
+ #
27
+ # @example
28
+ # require 'google/apis/books_v1'
29
+ #
30
+ # Books = Google::Apis::BooksV1 # Alias the module
31
+ # service = Books::BooksService.new
32
+ #
33
+ # @see https://developers.google.com/books/docs/v1/getting_started
34
+ class BooksService < 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/', 'books/v1/')
53
+ end
54
+
55
+ # Retrieves metadata for a specific bookshelf for the specified user.
56
+ # @param [String] user_id
57
+ # ID of user for whom to retrieve bookshelves.
58
+ # @param [String] shelf
59
+ # ID of bookshelf to retrieve.
60
+ # @param [String] source
61
+ # String to identify the originator of this request.
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
64
+ # @param [String] quota_user
65
+ # Available to use for quota purposes for server-side applications. Can be any
66
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
67
+ # Overrides userIp if both are provided.
68
+ # @param [String] user_ip
69
+ # IP address of the site where the request originates. Use this if you want to
70
+ # enforce per-user limits.
71
+ # @param [Google::Apis::RequestOptions] options
72
+ # Request-specific options
73
+ #
74
+ # @yield [result, err] Result & error if block supplied
75
+ # @yieldparam result [Google::Apis::BooksV1::Bookshelf] parsed result object
76
+ # @yieldparam err [StandardError] error object if request failed
77
+ #
78
+ # @return [Google::Apis::BooksV1::Bookshelf]
79
+ #
80
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
81
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
82
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
83
+ def get_bookshelf(user_id, shelf, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
84
+ command = make_simple_command(:get, 'users/{userId}/bookshelves/{shelf}', options)
85
+ command.response_representation = Google::Apis::BooksV1::Bookshelf::Representation
86
+ command.response_class = Google::Apis::BooksV1::Bookshelf
87
+ command.params['userId'] = user_id unless user_id.nil?
88
+ command.params['shelf'] = shelf unless shelf.nil?
89
+ command.query['source'] = source unless source.nil?
90
+ command.query['fields'] = fields unless fields.nil?
91
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
92
+ command.query['userIp'] = user_ip unless user_ip.nil?
93
+ execute_or_queue_command(command, &block)
94
+ end
95
+
96
+ # Retrieves a list of public bookshelves for the specified user.
97
+ # @param [String] user_id
98
+ # ID of user for whom to retrieve bookshelves.
99
+ # @param [String] source
100
+ # String to identify the originator of this request.
101
+ # @param [String] fields
102
+ # Selector specifying which fields to include in a partial response.
103
+ # @param [String] quota_user
104
+ # Available to use for quota purposes for server-side applications. Can be any
105
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
106
+ # Overrides userIp if both are provided.
107
+ # @param [String] user_ip
108
+ # IP address of the site where the request originates. Use this if you want to
109
+ # enforce per-user limits.
110
+ # @param [Google::Apis::RequestOptions] options
111
+ # Request-specific options
112
+ #
113
+ # @yield [result, err] Result & error if block supplied
114
+ # @yieldparam result [Google::Apis::BooksV1::Bookshelves] parsed result object
115
+ # @yieldparam err [StandardError] error object if request failed
116
+ #
117
+ # @return [Google::Apis::BooksV1::Bookshelves]
118
+ #
119
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
120
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
121
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
122
+ def list_bookshelves(user_id, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
123
+ command = make_simple_command(:get, 'users/{userId}/bookshelves', options)
124
+ command.response_representation = Google::Apis::BooksV1::Bookshelves::Representation
125
+ command.response_class = Google::Apis::BooksV1::Bookshelves
126
+ command.params['userId'] = user_id unless user_id.nil?
127
+ command.query['source'] = source unless source.nil?
128
+ command.query['fields'] = fields unless fields.nil?
129
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
130
+ command.query['userIp'] = user_ip unless user_ip.nil?
131
+ execute_or_queue_command(command, &block)
132
+ end
133
+
134
+ # Retrieves volumes in a specific bookshelf for the specified user.
135
+ # @param [String] user_id
136
+ # ID of user for whom to retrieve bookshelf volumes.
137
+ # @param [String] shelf
138
+ # ID of bookshelf to retrieve volumes.
139
+ # @param [Fixnum] max_results
140
+ # Maximum number of results to return
141
+ # @param [Boolean] show_preorders
142
+ # Set to true to show pre-ordered books. Defaults to false.
143
+ # @param [String] source
144
+ # String to identify the originator of this request.
145
+ # @param [Fixnum] start_index
146
+ # Index of the first element to return (starts at 0)
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::BooksV1::Volumes] parsed result object
161
+ # @yieldparam err [StandardError] error object if request failed
162
+ #
163
+ # @return [Google::Apis::BooksV1::Volumes]
164
+ #
165
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
166
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
167
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
168
+ def list_bookshelf_volumes(user_id, shelf, max_results: nil, show_preorders: nil, source: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
169
+ command = make_simple_command(:get, 'users/{userId}/bookshelves/{shelf}/volumes', options)
170
+ command.response_representation = Google::Apis::BooksV1::Volumes::Representation
171
+ command.response_class = Google::Apis::BooksV1::Volumes
172
+ command.params['userId'] = user_id unless user_id.nil?
173
+ command.params['shelf'] = shelf unless shelf.nil?
174
+ command.query['maxResults'] = max_results unless max_results.nil?
175
+ command.query['showPreorders'] = show_preorders unless show_preorders.nil?
176
+ command.query['source'] = source unless source.nil?
177
+ command.query['startIndex'] = start_index unless start_index.nil?
178
+ command.query['fields'] = fields unless fields.nil?
179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
180
+ command.query['userIp'] = user_ip unless user_ip.nil?
181
+ execute_or_queue_command(command, &block)
182
+ end
183
+
184
+ #
185
+ # @param [String] drive_document_id
186
+ # A drive document id. The upload_client_token must not be set.
187
+ # @param [String] mime_type
188
+ # The document MIME type. It can be set only if the drive_document_id is set.
189
+ # @param [String] name
190
+ # The document name. It can be set only if the drive_document_id is set.
191
+ # @param [String] upload_client_token
192
+ # @param [String] fields
193
+ # Selector specifying which fields to include in a partial response.
194
+ # @param [String] quota_user
195
+ # Available to use for quota purposes for server-side applications. Can be any
196
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
197
+ # Overrides userIp if both are provided.
198
+ # @param [String] user_ip
199
+ # IP address of the site where the request originates. Use this if you want to
200
+ # enforce per-user limits.
201
+ # @param [Google::Apis::RequestOptions] options
202
+ # Request-specific options
203
+ #
204
+ # @yield [result, err] Result & error if block supplied
205
+ # @yieldparam result [Google::Apis::BooksV1::LoadingResource] parsed result object
206
+ # @yieldparam err [StandardError] error object if request failed
207
+ #
208
+ # @return [Google::Apis::BooksV1::LoadingResource]
209
+ #
210
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
211
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
212
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
213
+ def add_book(drive_document_id: nil, mime_type: nil, name: nil, upload_client_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
214
+ command = make_simple_command(:post, 'cloudloading/addBook', options)
215
+ command.response_representation = Google::Apis::BooksV1::LoadingResource::Representation
216
+ command.response_class = Google::Apis::BooksV1::LoadingResource
217
+ command.query['drive_document_id'] = drive_document_id unless drive_document_id.nil?
218
+ command.query['mime_type'] = mime_type unless mime_type.nil?
219
+ command.query['name'] = name unless name.nil?
220
+ command.query['upload_client_token'] = upload_client_token unless upload_client_token.nil?
221
+ command.query['fields'] = fields unless fields.nil?
222
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
223
+ command.query['userIp'] = user_ip unless user_ip.nil?
224
+ execute_or_queue_command(command, &block)
225
+ end
226
+
227
+ # Remove the book and its contents
228
+ # @param [String] volume_id
229
+ # The id of the book to be removed.
230
+ # @param [String] fields
231
+ # Selector specifying which fields to include in a partial response.
232
+ # @param [String] quota_user
233
+ # Available to use for quota purposes for server-side applications. Can be any
234
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
235
+ # Overrides userIp if both are provided.
236
+ # @param [String] user_ip
237
+ # IP address of the site where the request originates. Use this if you want to
238
+ # enforce per-user limits.
239
+ # @param [Google::Apis::RequestOptions] options
240
+ # Request-specific options
241
+ #
242
+ # @yield [result, err] Result & error if block supplied
243
+ # @yieldparam result [NilClass] No result returned for this method
244
+ # @yieldparam err [StandardError] error object if request failed
245
+ #
246
+ # @return [void]
247
+ #
248
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
249
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
250
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
251
+ def delete_book(volume_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
252
+ command = make_simple_command(:post, 'cloudloading/deleteBook', options)
253
+ command.query['volumeId'] = volume_id unless volume_id.nil?
254
+ command.query['fields'] = fields unless fields.nil?
255
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
256
+ command.query['userIp'] = user_ip unless user_ip.nil?
257
+ execute_or_queue_command(command, &block)
258
+ end
259
+
260
+ #
261
+ # @param [Google::Apis::BooksV1::LoadingResource] loading_resource_object
262
+ # @param [String] fields
263
+ # Selector specifying which fields to include in a partial response.
264
+ # @param [String] quota_user
265
+ # Available to use for quota purposes for server-side applications. Can be any
266
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
267
+ # Overrides userIp if both are provided.
268
+ # @param [String] user_ip
269
+ # IP address of the site where the request originates. Use this if you want to
270
+ # enforce per-user limits.
271
+ # @param [Google::Apis::RequestOptions] options
272
+ # Request-specific options
273
+ #
274
+ # @yield [result, err] Result & error if block supplied
275
+ # @yieldparam result [Google::Apis::BooksV1::LoadingResource] parsed result object
276
+ # @yieldparam err [StandardError] error object if request failed
277
+ #
278
+ # @return [Google::Apis::BooksV1::LoadingResource]
279
+ #
280
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
281
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
282
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
283
+ def update_book(loading_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
284
+ command = make_simple_command(:post, 'cloudloading/updateBook', options)
285
+ command.request_representation = Google::Apis::BooksV1::LoadingResource::Representation
286
+ command.request_object = loading_resource_object
287
+ command.response_representation = Google::Apis::BooksV1::LoadingResource::Representation
288
+ command.response_class = Google::Apis::BooksV1::LoadingResource
289
+ command.query['fields'] = fields unless fields.nil?
290
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
291
+ command.query['userIp'] = user_ip unless user_ip.nil?
292
+ execute_or_queue_command(command, &block)
293
+ end
294
+
295
+ # Returns a list of offline dictionary metadata available
296
+ # @param [String] cpksver
297
+ # The device/version ID from which to request the data.
298
+ # @param [String] fields
299
+ # Selector specifying which fields to include in a partial response.
300
+ # @param [String] quota_user
301
+ # Available to use for quota purposes for server-side applications. Can be any
302
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
303
+ # Overrides userIp if both are provided.
304
+ # @param [String] user_ip
305
+ # IP address of the site where the request originates. Use this if you want to
306
+ # enforce per-user limits.
307
+ # @param [Google::Apis::RequestOptions] options
308
+ # Request-specific options
309
+ #
310
+ # @yield [result, err] Result & error if block supplied
311
+ # @yieldparam result [Google::Apis::BooksV1::Metadata] parsed result object
312
+ # @yieldparam err [StandardError] error object if request failed
313
+ #
314
+ # @return [Google::Apis::BooksV1::Metadata]
315
+ #
316
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
317
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
318
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
319
+ def list_offline_metadata_dictionary(cpksver, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
320
+ command = make_simple_command(:get, 'dictionary/listOfflineMetadata', options)
321
+ command.response_representation = Google::Apis::BooksV1::Metadata::Representation
322
+ command.response_class = Google::Apis::BooksV1::Metadata
323
+ command.query['cpksver'] = cpksver unless cpksver.nil?
324
+ command.query['fields'] = fields unless fields.nil?
325
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
326
+ command.query['userIp'] = user_ip unless user_ip.nil?
327
+ execute_or_queue_command(command, &block)
328
+ end
329
+
330
+ # Gets the layer summary for a volume.
331
+ # @param [String] volume_id
332
+ # The volume to retrieve layers for.
333
+ # @param [String] summary_id
334
+ # The ID for the layer to get the summary for.
335
+ # @param [String] content_version
336
+ # The content version for the requested volume.
337
+ # @param [String] source
338
+ # String to identify the originator of this request.
339
+ # @param [String] fields
340
+ # Selector specifying which fields to include in a partial response.
341
+ # @param [String] quota_user
342
+ # Available to use for quota purposes for server-side applications. Can be any
343
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
344
+ # Overrides userIp if both are provided.
345
+ # @param [String] user_ip
346
+ # IP address of the site where the request originates. Use this if you want to
347
+ # enforce per-user limits.
348
+ # @param [Google::Apis::RequestOptions] options
349
+ # Request-specific options
350
+ #
351
+ # @yield [result, err] Result & error if block supplied
352
+ # @yieldparam result [Google::Apis::BooksV1::LayerSummary] parsed result object
353
+ # @yieldparam err [StandardError] error object if request failed
354
+ #
355
+ # @return [Google::Apis::BooksV1::LayerSummary]
356
+ #
357
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
358
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
359
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
360
+ def get_layer(volume_id, summary_id, content_version: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
361
+ command = make_simple_command(:get, 'volumes/{volumeId}/layersummary/{summaryId}', options)
362
+ command.response_representation = Google::Apis::BooksV1::LayerSummary::Representation
363
+ command.response_class = Google::Apis::BooksV1::LayerSummary
364
+ command.params['volumeId'] = volume_id unless volume_id.nil?
365
+ command.params['summaryId'] = summary_id unless summary_id.nil?
366
+ command.query['contentVersion'] = content_version unless content_version.nil?
367
+ command.query['source'] = source unless source.nil?
368
+ command.query['fields'] = fields unless fields.nil?
369
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
370
+ command.query['userIp'] = user_ip unless user_ip.nil?
371
+ execute_or_queue_command(command, &block)
372
+ end
373
+
374
+ # List the layer summaries for a volume.
375
+ # @param [String] volume_id
376
+ # The volume to retrieve layers for.
377
+ # @param [String] content_version
378
+ # The content version for the requested volume.
379
+ # @param [Fixnum] max_results
380
+ # Maximum number of results to return
381
+ # @param [String] page_token
382
+ # The value of the nextToken from the previous page.
383
+ # @param [String] source
384
+ # String to identify the originator of this request.
385
+ # @param [String] fields
386
+ # Selector specifying which fields to include in a partial response.
387
+ # @param [String] quota_user
388
+ # Available to use for quota purposes for server-side applications. Can be any
389
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
390
+ # Overrides userIp if both are provided.
391
+ # @param [String] user_ip
392
+ # IP address of the site where the request originates. Use this if you want to
393
+ # enforce per-user limits.
394
+ # @param [Google::Apis::RequestOptions] options
395
+ # Request-specific options
396
+ #
397
+ # @yield [result, err] Result & error if block supplied
398
+ # @yieldparam result [Google::Apis::BooksV1::LayerSummaries] parsed result object
399
+ # @yieldparam err [StandardError] error object if request failed
400
+ #
401
+ # @return [Google::Apis::BooksV1::LayerSummaries]
402
+ #
403
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
404
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
405
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
406
+ def list_layers(volume_id, content_version: nil, max_results: nil, page_token: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
407
+ command = make_simple_command(:get, 'volumes/{volumeId}/layersummary', options)
408
+ command.response_representation = Google::Apis::BooksV1::LayerSummaries::Representation
409
+ command.response_class = Google::Apis::BooksV1::LayerSummaries
410
+ command.params['volumeId'] = volume_id unless volume_id.nil?
411
+ command.query['contentVersion'] = content_version unless content_version.nil?
412
+ command.query['maxResults'] = max_results unless max_results.nil?
413
+ command.query['pageToken'] = page_token unless page_token.nil?
414
+ command.query['source'] = source unless source.nil?
415
+ command.query['fields'] = fields unless fields.nil?
416
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
417
+ command.query['userIp'] = user_ip unless user_ip.nil?
418
+ execute_or_queue_command(command, &block)
419
+ end
420
+
421
+ # Gets the annotation data.
422
+ # @param [String] volume_id
423
+ # The volume to retrieve annotations for.
424
+ # @param [String] layer_id
425
+ # The ID for the layer to get the annotations.
426
+ # @param [String] annotation_data_id
427
+ # The ID of the annotation data to retrieve.
428
+ # @param [String] content_version
429
+ # The content version for the volume you are trying to retrieve.
430
+ # @param [Boolean] allow_web_definitions
431
+ # For the dictionary layer. Whether or not to allow web definitions.
432
+ # @param [Fixnum] h
433
+ # The requested pixel height for any images. If height is provided width must
434
+ # also be provided.
435
+ # @param [String] locale
436
+ # The locale information for the data. ISO-639-1 language and ISO-3166-1 country
437
+ # code. Ex: 'en_US'.
438
+ # @param [Fixnum] scale
439
+ # The requested scale for the image.
440
+ # @param [String] source
441
+ # String to identify the originator of this request.
442
+ # @param [Fixnum] w
443
+ # The requested pixel width for any images. If width is provided height must
444
+ # also be provided.
445
+ # @param [String] fields
446
+ # Selector specifying which fields to include in a partial response.
447
+ # @param [String] quota_user
448
+ # Available to use for quota purposes for server-side applications. Can be any
449
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
450
+ # Overrides userIp if both are provided.
451
+ # @param [String] user_ip
452
+ # IP address of the site where the request originates. Use this if you want to
453
+ # enforce per-user limits.
454
+ # @param [Google::Apis::RequestOptions] options
455
+ # Request-specific options
456
+ #
457
+ # @yield [result, err] Result & error if block supplied
458
+ # @yieldparam result [Google::Apis::BooksV1::AnnotationData] parsed result object
459
+ # @yieldparam err [StandardError] error object if request failed
460
+ #
461
+ # @return [Google::Apis::BooksV1::AnnotationData]
462
+ #
463
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
464
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
465
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
466
+ def get_layer_annotation_data(volume_id, layer_id, annotation_data_id, content_version, allow_web_definitions: nil, h: nil, locale: nil, scale: nil, source: nil, w: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
467
+ command = make_simple_command(:get, 'volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}', options)
468
+ command.response_representation = Google::Apis::BooksV1::AnnotationData::Representation
469
+ command.response_class = Google::Apis::BooksV1::AnnotationData
470
+ command.params['volumeId'] = volume_id unless volume_id.nil?
471
+ command.params['layerId'] = layer_id unless layer_id.nil?
472
+ command.params['annotationDataId'] = annotation_data_id unless annotation_data_id.nil?
473
+ command.query['allowWebDefinitions'] = allow_web_definitions unless allow_web_definitions.nil?
474
+ command.query['contentVersion'] = content_version unless content_version.nil?
475
+ command.query['h'] = h unless h.nil?
476
+ command.query['locale'] = locale unless locale.nil?
477
+ command.query['scale'] = scale unless scale.nil?
478
+ command.query['source'] = source unless source.nil?
479
+ command.query['w'] = w unless w.nil?
480
+ command.query['fields'] = fields unless fields.nil?
481
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
482
+ command.query['userIp'] = user_ip unless user_ip.nil?
483
+ execute_or_queue_command(command, &block)
484
+ end
485
+
486
+ # Gets the annotation data for a volume and layer.
487
+ # @param [String] volume_id
488
+ # The volume to retrieve annotation data for.
489
+ # @param [String] layer_id
490
+ # The ID for the layer to get the annotation data.
491
+ # @param [String] content_version
492
+ # The content version for the requested volume.
493
+ # @param [Array<String>, String] annotation_data_id
494
+ # The list of Annotation Data Ids to retrieve. Pagination is ignored if this is
495
+ # set.
496
+ # @param [Fixnum] h
497
+ # The requested pixel height for any images. If height is provided width must
498
+ # also be provided.
499
+ # @param [String] locale
500
+ # The locale information for the data. ISO-639-1 language and ISO-3166-1 country
501
+ # code. Ex: 'en_US'.
502
+ # @param [Fixnum] max_results
503
+ # Maximum number of results to return
504
+ # @param [String] page_token
505
+ # The value of the nextToken from the previous page.
506
+ # @param [Fixnum] scale
507
+ # The requested scale for the image.
508
+ # @param [String] source
509
+ # String to identify the originator of this request.
510
+ # @param [String] updated_max
511
+ # RFC 3339 timestamp to restrict to items updated prior to this timestamp (
512
+ # exclusive).
513
+ # @param [String] updated_min
514
+ # RFC 3339 timestamp to restrict to items updated since this timestamp (
515
+ # inclusive).
516
+ # @param [Fixnum] w
517
+ # The requested pixel width for any images. If width is provided height must
518
+ # also be provided.
519
+ # @param [String] fields
520
+ # Selector specifying which fields to include in a partial response.
521
+ # @param [String] quota_user
522
+ # Available to use for quota purposes for server-side applications. Can be any
523
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
524
+ # Overrides userIp if both are provided.
525
+ # @param [String] user_ip
526
+ # IP address of the site where the request originates. Use this if you want to
527
+ # enforce per-user limits.
528
+ # @param [Google::Apis::RequestOptions] options
529
+ # Request-specific options
530
+ #
531
+ # @yield [result, err] Result & error if block supplied
532
+ # @yieldparam result [Google::Apis::BooksV1::AnnotationsData] parsed result object
533
+ # @yieldparam err [StandardError] error object if request failed
534
+ #
535
+ # @return [Google::Apis::BooksV1::AnnotationsData]
536
+ #
537
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
538
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
539
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
540
+ def list_layer_annotation_data(volume_id, layer_id, content_version, annotation_data_id: nil, h: nil, locale: nil, max_results: nil, page_token: nil, scale: nil, source: nil, updated_max: nil, updated_min: nil, w: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
541
+ command = make_simple_command(:get, 'volumes/{volumeId}/layers/{layerId}/data', options)
542
+ command.response_representation = Google::Apis::BooksV1::AnnotationsData::Representation
543
+ command.response_class = Google::Apis::BooksV1::AnnotationsData
544
+ command.params['volumeId'] = volume_id unless volume_id.nil?
545
+ command.params['layerId'] = layer_id unless layer_id.nil?
546
+ command.query['annotationDataId'] = annotation_data_id unless annotation_data_id.nil?
547
+ command.query['contentVersion'] = content_version unless content_version.nil?
548
+ command.query['h'] = h unless h.nil?
549
+ command.query['locale'] = locale unless locale.nil?
550
+ command.query['maxResults'] = max_results unless max_results.nil?
551
+ command.query['pageToken'] = page_token unless page_token.nil?
552
+ command.query['scale'] = scale unless scale.nil?
553
+ command.query['source'] = source unless source.nil?
554
+ command.query['updatedMax'] = updated_max unless updated_max.nil?
555
+ command.query['updatedMin'] = updated_min unless updated_min.nil?
556
+ command.query['w'] = w unless w.nil?
557
+ command.query['fields'] = fields unless fields.nil?
558
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
559
+ command.query['userIp'] = user_ip unless user_ip.nil?
560
+ execute_or_queue_command(command, &block)
561
+ end
562
+
563
+ # Gets the volume annotation.
564
+ # @param [String] volume_id
565
+ # The volume to retrieve annotations for.
566
+ # @param [String] layer_id
567
+ # The ID for the layer to get the annotations.
568
+ # @param [String] annotation_id
569
+ # The ID of the volume annotation to retrieve.
570
+ # @param [String] locale
571
+ # The locale information for the data. ISO-639-1 language and ISO-3166-1 country
572
+ # code. Ex: 'en_US'.
573
+ # @param [String] source
574
+ # String to identify the originator of this request.
575
+ # @param [String] fields
576
+ # Selector specifying which fields to include in a partial response.
577
+ # @param [String] quota_user
578
+ # Available to use for quota purposes for server-side applications. Can be any
579
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
580
+ # Overrides userIp if both are provided.
581
+ # @param [String] user_ip
582
+ # IP address of the site where the request originates. Use this if you want to
583
+ # enforce per-user limits.
584
+ # @param [Google::Apis::RequestOptions] options
585
+ # Request-specific options
586
+ #
587
+ # @yield [result, err] Result & error if block supplied
588
+ # @yieldparam result [Google::Apis::BooksV1::VolumeAnnotation] parsed result object
589
+ # @yieldparam err [StandardError] error object if request failed
590
+ #
591
+ # @return [Google::Apis::BooksV1::VolumeAnnotation]
592
+ #
593
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
594
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
595
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
596
+ def get_layer_volume_annotation(volume_id, layer_id, annotation_id, locale: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
597
+ command = make_simple_command(:get, 'volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}', options)
598
+ command.response_representation = Google::Apis::BooksV1::VolumeAnnotation::Representation
599
+ command.response_class = Google::Apis::BooksV1::VolumeAnnotation
600
+ command.params['volumeId'] = volume_id unless volume_id.nil?
601
+ command.params['layerId'] = layer_id unless layer_id.nil?
602
+ command.params['annotationId'] = annotation_id unless annotation_id.nil?
603
+ command.query['locale'] = locale unless locale.nil?
604
+ command.query['source'] = source unless source.nil?
605
+ command.query['fields'] = fields unless fields.nil?
606
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
607
+ command.query['userIp'] = user_ip unless user_ip.nil?
608
+ execute_or_queue_command(command, &block)
609
+ end
610
+
611
+ # Gets the volume annotations for a volume and layer.
612
+ # @param [String] volume_id
613
+ # The volume to retrieve annotations for.
614
+ # @param [String] layer_id
615
+ # The ID for the layer to get the annotations.
616
+ # @param [String] content_version
617
+ # The content version for the requested volume.
618
+ # @param [String] end_offset
619
+ # The end offset to end retrieving data from.
620
+ # @param [String] end_position
621
+ # The end position to end retrieving data from.
622
+ # @param [String] locale
623
+ # The locale information for the data. ISO-639-1 language and ISO-3166-1 country
624
+ # code. Ex: 'en_US'.
625
+ # @param [Fixnum] max_results
626
+ # Maximum number of results to return
627
+ # @param [String] page_token
628
+ # The value of the nextToken from the previous page.
629
+ # @param [Boolean] show_deleted
630
+ # Set to true to return deleted annotations. updatedMin must be in the request
631
+ # to use this. Defaults to false.
632
+ # @param [String] source
633
+ # String to identify the originator of this request.
634
+ # @param [String] start_offset
635
+ # The start offset to start retrieving data from.
636
+ # @param [String] start_position
637
+ # The start position to start retrieving data from.
638
+ # @param [String] updated_max
639
+ # RFC 3339 timestamp to restrict to items updated prior to this timestamp (
640
+ # exclusive).
641
+ # @param [String] updated_min
642
+ # RFC 3339 timestamp to restrict to items updated since this timestamp (
643
+ # inclusive).
644
+ # @param [String] volume_annotations_version
645
+ # The version of the volume annotations that you are requesting.
646
+ # @param [String] fields
647
+ # Selector specifying which fields to include in a partial response.
648
+ # @param [String] quota_user
649
+ # Available to use for quota purposes for server-side applications. Can be any
650
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
651
+ # Overrides userIp if both are provided.
652
+ # @param [String] user_ip
653
+ # IP address of the site where the request originates. Use this if you want to
654
+ # enforce per-user limits.
655
+ # @param [Google::Apis::RequestOptions] options
656
+ # Request-specific options
657
+ #
658
+ # @yield [result, err] Result & error if block supplied
659
+ # @yieldparam result [Google::Apis::BooksV1::Volumeannotations] parsed result object
660
+ # @yieldparam err [StandardError] error object if request failed
661
+ #
662
+ # @return [Google::Apis::BooksV1::Volumeannotations]
663
+ #
664
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
665
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
666
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
667
+ def list_layer_volume_annotations(volume_id, layer_id, content_version, end_offset: nil, end_position: nil, locale: nil, max_results: nil, page_token: nil, show_deleted: nil, source: nil, start_offset: nil, start_position: nil, updated_max: nil, updated_min: nil, volume_annotations_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
668
+ command = make_simple_command(:get, 'volumes/{volumeId}/layers/{layerId}', options)
669
+ command.response_representation = Google::Apis::BooksV1::Volumeannotations::Representation
670
+ command.response_class = Google::Apis::BooksV1::Volumeannotations
671
+ command.params['volumeId'] = volume_id unless volume_id.nil?
672
+ command.params['layerId'] = layer_id unless layer_id.nil?
673
+ command.query['contentVersion'] = content_version unless content_version.nil?
674
+ command.query['endOffset'] = end_offset unless end_offset.nil?
675
+ command.query['endPosition'] = end_position unless end_position.nil?
676
+ command.query['locale'] = locale unless locale.nil?
677
+ command.query['maxResults'] = max_results unless max_results.nil?
678
+ command.query['pageToken'] = page_token unless page_token.nil?
679
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
680
+ command.query['source'] = source unless source.nil?
681
+ command.query['startOffset'] = start_offset unless start_offset.nil?
682
+ command.query['startPosition'] = start_position unless start_position.nil?
683
+ command.query['updatedMax'] = updated_max unless updated_max.nil?
684
+ command.query['updatedMin'] = updated_min unless updated_min.nil?
685
+ command.query['volumeAnnotationsVersion'] = volume_annotations_version unless volume_annotations_version.nil?
686
+ command.query['fields'] = fields unless fields.nil?
687
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
688
+ command.query['userIp'] = user_ip unless user_ip.nil?
689
+ execute_or_queue_command(command, &block)
690
+ end
691
+
692
+ # Gets the current settings for the user.
693
+ # @param [String] fields
694
+ # Selector specifying which fields to include in a partial response.
695
+ # @param [String] quota_user
696
+ # Available to use for quota purposes for server-side applications. Can be any
697
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
698
+ # Overrides userIp if both are provided.
699
+ # @param [String] user_ip
700
+ # IP address of the site where the request originates. Use this if you want to
701
+ # enforce per-user limits.
702
+ # @param [Google::Apis::RequestOptions] options
703
+ # Request-specific options
704
+ #
705
+ # @yield [result, err] Result & error if block supplied
706
+ # @yieldparam result [Google::Apis::BooksV1::UserSettings] parsed result object
707
+ # @yieldparam err [StandardError] error object if request failed
708
+ #
709
+ # @return [Google::Apis::BooksV1::UserSettings]
710
+ #
711
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
712
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
713
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
714
+ def get_user_settings(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
715
+ command = make_simple_command(:get, 'myconfig/getUserSettings', options)
716
+ command.response_representation = Google::Apis::BooksV1::UserSettings::Representation
717
+ command.response_class = Google::Apis::BooksV1::UserSettings
718
+ command.query['fields'] = fields unless fields.nil?
719
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
720
+ command.query['userIp'] = user_ip unless user_ip.nil?
721
+ execute_or_queue_command(command, &block)
722
+ end
723
+
724
+ # Release downloaded content access restriction.
725
+ # @param [Array<String>, String] volume_ids
726
+ # The volume(s) to release restrictions for.
727
+ # @param [String] cpksver
728
+ # The device/version ID from which to release the restriction.
729
+ # @param [String] locale
730
+ # ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.
731
+ # @param [String] source
732
+ # String to identify the originator of this request.
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::BooksV1::DownloadAccesses] parsed result object
747
+ # @yieldparam err [StandardError] error object if request failed
748
+ #
749
+ # @return [Google::Apis::BooksV1::DownloadAccesses]
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 release_download_access(volume_ids, cpksver, locale: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
755
+ command = make_simple_command(:post, 'myconfig/releaseDownloadAccess', options)
756
+ command.response_representation = Google::Apis::BooksV1::DownloadAccesses::Representation
757
+ command.response_class = Google::Apis::BooksV1::DownloadAccesses
758
+ command.query['cpksver'] = cpksver unless cpksver.nil?
759
+ command.query['locale'] = locale unless locale.nil?
760
+ command.query['source'] = source unless source.nil?
761
+ command.query['volumeIds'] = volume_ids unless volume_ids.nil?
762
+ command.query['fields'] = fields unless fields.nil?
763
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
764
+ command.query['userIp'] = user_ip unless user_ip.nil?
765
+ execute_or_queue_command(command, &block)
766
+ end
767
+
768
+ # Request concurrent and download access restrictions.
769
+ # @param [String] source
770
+ # String to identify the originator of this request.
771
+ # @param [String] volume_id
772
+ # The volume to request concurrent/download restrictions for.
773
+ # @param [String] nonce
774
+ # The client nonce value.
775
+ # @param [String] cpksver
776
+ # The device/version ID from which to request the restrictions.
777
+ # @param [String] license_types
778
+ # The type of access license to request. If not specified, the default is BOTH.
779
+ # @param [String] locale
780
+ # ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.
781
+ # @param [String] fields
782
+ # Selector specifying which fields to include in a partial response.
783
+ # @param [String] quota_user
784
+ # Available to use for quota purposes for server-side applications. Can be any
785
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
786
+ # Overrides userIp if both are provided.
787
+ # @param [String] user_ip
788
+ # IP address of the site where the request originates. Use this if you want to
789
+ # enforce per-user limits.
790
+ # @param [Google::Apis::RequestOptions] options
791
+ # Request-specific options
792
+ #
793
+ # @yield [result, err] Result & error if block supplied
794
+ # @yieldparam result [Google::Apis::BooksV1::RequestAccess] parsed result object
795
+ # @yieldparam err [StandardError] error object if request failed
796
+ #
797
+ # @return [Google::Apis::BooksV1::RequestAccess]
798
+ #
799
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
800
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
801
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
802
+ def request_access(source, volume_id, nonce, cpksver, license_types: nil, locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
803
+ command = make_simple_command(:post, 'myconfig/requestAccess', options)
804
+ command.response_representation = Google::Apis::BooksV1::RequestAccess::Representation
805
+ command.response_class = Google::Apis::BooksV1::RequestAccess
806
+ command.query['cpksver'] = cpksver unless cpksver.nil?
807
+ command.query['licenseTypes'] = license_types unless license_types.nil?
808
+ command.query['locale'] = locale unless locale.nil?
809
+ command.query['nonce'] = nonce unless nonce.nil?
810
+ command.query['source'] = source unless source.nil?
811
+ command.query['volumeId'] = volume_id unless volume_id.nil?
812
+ command.query['fields'] = fields unless fields.nil?
813
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
814
+ command.query['userIp'] = user_ip unless user_ip.nil?
815
+ execute_or_queue_command(command, &block)
816
+ end
817
+
818
+ # Request downloaded content access for specified volumes on the My eBooks shelf.
819
+ # @param [String] source
820
+ # String to identify the originator of this request.
821
+ # @param [String] nonce
822
+ # The client nonce value.
823
+ # @param [String] cpksver
824
+ # The device/version ID from which to release the restriction.
825
+ # @param [Array<String>, String] features
826
+ # List of features supported by the client, i.e., 'RENTALS'
827
+ # @param [String] locale
828
+ # ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.
829
+ # @param [Boolean] show_preorders
830
+ # Set to true to show pre-ordered books. Defaults to false.
831
+ # @param [Array<String>, String] volume_ids
832
+ # The volume(s) to request download restrictions for.
833
+ # @param [String] fields
834
+ # Selector specifying which fields to include in a partial response.
835
+ # @param [String] quota_user
836
+ # Available to use for quota purposes for server-side applications. Can be any
837
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
838
+ # Overrides userIp if both are provided.
839
+ # @param [String] user_ip
840
+ # IP address of the site where the request originates. Use this if you want to
841
+ # enforce per-user limits.
842
+ # @param [Google::Apis::RequestOptions] options
843
+ # Request-specific options
844
+ #
845
+ # @yield [result, err] Result & error if block supplied
846
+ # @yieldparam result [Google::Apis::BooksV1::Volumes] parsed result object
847
+ # @yieldparam err [StandardError] error object if request failed
848
+ #
849
+ # @return [Google::Apis::BooksV1::Volumes]
850
+ #
851
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
852
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
853
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
854
+ def sync_volume_licenses(source, nonce, cpksver, features: nil, locale: nil, show_preorders: nil, volume_ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
855
+ command = make_simple_command(:post, 'myconfig/syncVolumeLicenses', options)
856
+ command.response_representation = Google::Apis::BooksV1::Volumes::Representation
857
+ command.response_class = Google::Apis::BooksV1::Volumes
858
+ command.query['cpksver'] = cpksver unless cpksver.nil?
859
+ command.query['features'] = features unless features.nil?
860
+ command.query['locale'] = locale unless locale.nil?
861
+ command.query['nonce'] = nonce unless nonce.nil?
862
+ command.query['showPreorders'] = show_preorders unless show_preorders.nil?
863
+ command.query['source'] = source unless source.nil?
864
+ command.query['volumeIds'] = volume_ids unless volume_ids.nil?
865
+ command.query['fields'] = fields unless fields.nil?
866
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
867
+ command.query['userIp'] = user_ip unless user_ip.nil?
868
+ execute_or_queue_command(command, &block)
869
+ end
870
+
871
+ # Sets the settings for the user. If a sub-object is specified, it will
872
+ # overwrite the existing sub-object stored in the server. Unspecified sub-
873
+ # objects will retain the existing value.
874
+ # @param [Google::Apis::BooksV1::UserSettings] user_settings_object
875
+ # @param [String] fields
876
+ # Selector specifying which fields to include in a partial response.
877
+ # @param [String] quota_user
878
+ # Available to use for quota purposes for server-side applications. Can be any
879
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
880
+ # Overrides userIp if both are provided.
881
+ # @param [String] user_ip
882
+ # IP address of the site where the request originates. Use this if you want to
883
+ # enforce per-user limits.
884
+ # @param [Google::Apis::RequestOptions] options
885
+ # Request-specific options
886
+ #
887
+ # @yield [result, err] Result & error if block supplied
888
+ # @yieldparam result [Google::Apis::BooksV1::UserSettings] parsed result object
889
+ # @yieldparam err [StandardError] error object if request failed
890
+ #
891
+ # @return [Google::Apis::BooksV1::UserSettings]
892
+ #
893
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
894
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
895
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
896
+ def update_user_settings(user_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
897
+ command = make_simple_command(:post, 'myconfig/updateUserSettings', options)
898
+ command.request_representation = Google::Apis::BooksV1::UserSettings::Representation
899
+ command.request_object = user_settings_object
900
+ command.response_representation = Google::Apis::BooksV1::UserSettings::Representation
901
+ command.response_class = Google::Apis::BooksV1::UserSettings
902
+ command.query['fields'] = fields unless fields.nil?
903
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
904
+ command.query['userIp'] = user_ip unless user_ip.nil?
905
+ execute_or_queue_command(command, &block)
906
+ end
907
+
908
+ # Deletes an annotation.
909
+ # @param [String] annotation_id
910
+ # The ID for the annotation to delete.
911
+ # @param [String] source
912
+ # String to identify the originator of this request.
913
+ # @param [String] fields
914
+ # Selector specifying which fields to include in a partial response.
915
+ # @param [String] quota_user
916
+ # Available to use for quota purposes for server-side applications. Can be any
917
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
918
+ # Overrides userIp if both are provided.
919
+ # @param [String] user_ip
920
+ # IP address of the site where the request originates. Use this if you want to
921
+ # enforce per-user limits.
922
+ # @param [Google::Apis::RequestOptions] options
923
+ # Request-specific options
924
+ #
925
+ # @yield [result, err] Result & error if block supplied
926
+ # @yieldparam result [NilClass] No result returned for this method
927
+ # @yieldparam err [StandardError] error object if request failed
928
+ #
929
+ # @return [void]
930
+ #
931
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
932
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
933
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
934
+ def delete_my_library_annotation(annotation_id, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
935
+ command = make_simple_command(:delete, 'mylibrary/annotations/{annotationId}', options)
936
+ command.params['annotationId'] = annotation_id unless annotation_id.nil?
937
+ command.query['source'] = source unless source.nil?
938
+ command.query['fields'] = fields unless fields.nil?
939
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
940
+ command.query['userIp'] = user_ip unless user_ip.nil?
941
+ execute_or_queue_command(command, &block)
942
+ end
943
+
944
+ # Inserts a new annotation.
945
+ # @param [Google::Apis::BooksV1::Annotation] annotation_object
946
+ # @param [String] country
947
+ # ISO-3166-1 code to override the IP-based location.
948
+ # @param [Boolean] show_only_summary_in_response
949
+ # Requests that only the summary of the specified layer be provided in the
950
+ # response.
951
+ # @param [String] source
952
+ # String to identify the originator of this request.
953
+ # @param [String] fields
954
+ # Selector specifying which fields to include in a partial response.
955
+ # @param [String] quota_user
956
+ # Available to use for quota purposes for server-side applications. Can be any
957
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
958
+ # Overrides userIp if both are provided.
959
+ # @param [String] user_ip
960
+ # IP address of the site where the request originates. Use this if you want to
961
+ # enforce per-user limits.
962
+ # @param [Google::Apis::RequestOptions] options
963
+ # Request-specific options
964
+ #
965
+ # @yield [result, err] Result & error if block supplied
966
+ # @yieldparam result [Google::Apis::BooksV1::Annotation] parsed result object
967
+ # @yieldparam err [StandardError] error object if request failed
968
+ #
969
+ # @return [Google::Apis::BooksV1::Annotation]
970
+ #
971
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
972
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
973
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
974
+ def insert_my_library_annotation(annotation_object = nil, country: nil, show_only_summary_in_response: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
975
+ command = make_simple_command(:post, 'mylibrary/annotations', options)
976
+ command.request_representation = Google::Apis::BooksV1::Annotation::Representation
977
+ command.request_object = annotation_object
978
+ command.response_representation = Google::Apis::BooksV1::Annotation::Representation
979
+ command.response_class = Google::Apis::BooksV1::Annotation
980
+ command.query['country'] = country unless country.nil?
981
+ command.query['showOnlySummaryInResponse'] = show_only_summary_in_response unless show_only_summary_in_response.nil?
982
+ command.query['source'] = source unless source.nil?
983
+ command.query['fields'] = fields unless fields.nil?
984
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
985
+ command.query['userIp'] = user_ip unless user_ip.nil?
986
+ execute_or_queue_command(command, &block)
987
+ end
988
+
989
+ # Retrieves a list of annotations, possibly filtered.
990
+ # @param [String] content_version
991
+ # The content version for the requested volume.
992
+ # @param [String] layer_id
993
+ # The layer ID to limit annotation by.
994
+ # @param [Array<String>, String] layer_ids
995
+ # The layer ID(s) to limit annotation by.
996
+ # @param [Fixnum] max_results
997
+ # Maximum number of results to return
998
+ # @param [String] page_token
999
+ # The value of the nextToken from the previous page.
1000
+ # @param [Boolean] show_deleted
1001
+ # Set to true to return deleted annotations. updatedMin must be in the request
1002
+ # to use this. Defaults to false.
1003
+ # @param [String] source
1004
+ # String to identify the originator of this request.
1005
+ # @param [String] updated_max
1006
+ # RFC 3339 timestamp to restrict to items updated prior to this timestamp (
1007
+ # exclusive).
1008
+ # @param [String] updated_min
1009
+ # RFC 3339 timestamp to restrict to items updated since this timestamp (
1010
+ # inclusive).
1011
+ # @param [String] volume_id
1012
+ # The volume to restrict annotations to.
1013
+ # @param [String] fields
1014
+ # Selector specifying which fields to include in a partial response.
1015
+ # @param [String] quota_user
1016
+ # Available to use for quota purposes for server-side applications. Can be any
1017
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1018
+ # Overrides userIp if both are provided.
1019
+ # @param [String] user_ip
1020
+ # IP address of the site where the request originates. Use this if you want to
1021
+ # enforce per-user limits.
1022
+ # @param [Google::Apis::RequestOptions] options
1023
+ # Request-specific options
1024
+ #
1025
+ # @yield [result, err] Result & error if block supplied
1026
+ # @yieldparam result [Google::Apis::BooksV1::Annotations] parsed result object
1027
+ # @yieldparam err [StandardError] error object if request failed
1028
+ #
1029
+ # @return [Google::Apis::BooksV1::Annotations]
1030
+ #
1031
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1032
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1033
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1034
+ def list_my_library_annotations(content_version: nil, layer_id: nil, layer_ids: nil, max_results: nil, page_token: nil, show_deleted: nil, source: nil, updated_max: nil, updated_min: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1035
+ command = make_simple_command(:get, 'mylibrary/annotations', options)
1036
+ command.response_representation = Google::Apis::BooksV1::Annotations::Representation
1037
+ command.response_class = Google::Apis::BooksV1::Annotations
1038
+ command.query['contentVersion'] = content_version unless content_version.nil?
1039
+ command.query['layerId'] = layer_id unless layer_id.nil?
1040
+ command.query['layerIds'] = layer_ids unless layer_ids.nil?
1041
+ command.query['maxResults'] = max_results unless max_results.nil?
1042
+ command.query['pageToken'] = page_token unless page_token.nil?
1043
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
1044
+ command.query['source'] = source unless source.nil?
1045
+ command.query['updatedMax'] = updated_max unless updated_max.nil?
1046
+ command.query['updatedMin'] = updated_min unless updated_min.nil?
1047
+ command.query['volumeId'] = volume_id unless volume_id.nil?
1048
+ command.query['fields'] = fields unless fields.nil?
1049
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1050
+ command.query['userIp'] = user_ip unless user_ip.nil?
1051
+ execute_or_queue_command(command, &block)
1052
+ end
1053
+
1054
+ # Gets the summary of specified layers.
1055
+ # @param [Array<String>, String] layer_ids
1056
+ # Array of layer IDs to get the summary for.
1057
+ # @param [String] volume_id
1058
+ # Volume id to get the summary for.
1059
+ # @param [String] fields
1060
+ # Selector specifying which fields to include in a partial response.
1061
+ # @param [String] quota_user
1062
+ # Available to use for quota purposes for server-side applications. Can be any
1063
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1064
+ # Overrides userIp if both are provided.
1065
+ # @param [String] user_ip
1066
+ # IP address of the site where the request originates. Use this if you want to
1067
+ # enforce per-user limits.
1068
+ # @param [Google::Apis::RequestOptions] options
1069
+ # Request-specific options
1070
+ #
1071
+ # @yield [result, err] Result & error if block supplied
1072
+ # @yieldparam result [Google::Apis::BooksV1::AnnotationsSummary] parsed result object
1073
+ # @yieldparam err [StandardError] error object if request failed
1074
+ #
1075
+ # @return [Google::Apis::BooksV1::AnnotationsSummary]
1076
+ #
1077
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1078
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1079
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1080
+ def summarize_my_library_annotation(layer_ids, volume_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1081
+ command = make_simple_command(:post, 'mylibrary/annotations/summary', options)
1082
+ command.response_representation = Google::Apis::BooksV1::AnnotationsSummary::Representation
1083
+ command.response_class = Google::Apis::BooksV1::AnnotationsSummary
1084
+ command.query['layerIds'] = layer_ids unless layer_ids.nil?
1085
+ command.query['volumeId'] = volume_id unless volume_id.nil?
1086
+ command.query['fields'] = fields unless fields.nil?
1087
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1088
+ command.query['userIp'] = user_ip unless user_ip.nil?
1089
+ execute_or_queue_command(command, &block)
1090
+ end
1091
+
1092
+ # Updates an existing annotation.
1093
+ # @param [String] annotation_id
1094
+ # The ID for the annotation to update.
1095
+ # @param [Google::Apis::BooksV1::Annotation] annotation_object
1096
+ # @param [String] source
1097
+ # String to identify the originator of this request.
1098
+ # @param [String] fields
1099
+ # Selector specifying which fields to include in a partial response.
1100
+ # @param [String] quota_user
1101
+ # Available to use for quota purposes for server-side applications. Can be any
1102
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1103
+ # Overrides userIp if both are provided.
1104
+ # @param [String] user_ip
1105
+ # IP address of the site where the request originates. Use this if you want to
1106
+ # enforce per-user limits.
1107
+ # @param [Google::Apis::RequestOptions] options
1108
+ # Request-specific options
1109
+ #
1110
+ # @yield [result, err] Result & error if block supplied
1111
+ # @yieldparam result [Google::Apis::BooksV1::Annotation] parsed result object
1112
+ # @yieldparam err [StandardError] error object if request failed
1113
+ #
1114
+ # @return [Google::Apis::BooksV1::Annotation]
1115
+ #
1116
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1117
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1118
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1119
+ def update_my_library_annotation(annotation_id, annotation_object = nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1120
+ command = make_simple_command(:put, 'mylibrary/annotations/{annotationId}', options)
1121
+ command.request_representation = Google::Apis::BooksV1::Annotation::Representation
1122
+ command.request_object = annotation_object
1123
+ command.response_representation = Google::Apis::BooksV1::Annotation::Representation
1124
+ command.response_class = Google::Apis::BooksV1::Annotation
1125
+ command.params['annotationId'] = annotation_id unless annotation_id.nil?
1126
+ command.query['source'] = source unless source.nil?
1127
+ command.query['fields'] = fields unless fields.nil?
1128
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1129
+ command.query['userIp'] = user_ip unless user_ip.nil?
1130
+ execute_or_queue_command(command, &block)
1131
+ end
1132
+
1133
+ # Adds a volume to a bookshelf.
1134
+ # @param [String] shelf
1135
+ # ID of bookshelf to which to add a volume.
1136
+ # @param [String] volume_id
1137
+ # ID of volume to add.
1138
+ # @param [String] reason
1139
+ # The reason for which the book is added to the library.
1140
+ # @param [String] source
1141
+ # String to identify the originator of this request.
1142
+ # @param [String] fields
1143
+ # Selector specifying which fields to include in a partial response.
1144
+ # @param [String] quota_user
1145
+ # Available to use for quota purposes for server-side applications. Can be any
1146
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1147
+ # Overrides userIp if both are provided.
1148
+ # @param [String] user_ip
1149
+ # IP address of the site where the request originates. Use this if you want to
1150
+ # enforce per-user limits.
1151
+ # @param [Google::Apis::RequestOptions] options
1152
+ # Request-specific options
1153
+ #
1154
+ # @yield [result, err] Result & error if block supplied
1155
+ # @yieldparam result [NilClass] No result returned for this method
1156
+ # @yieldparam err [StandardError] error object if request failed
1157
+ #
1158
+ # @return [void]
1159
+ #
1160
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1161
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1162
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1163
+ def add_my_library_volume(shelf, volume_id, reason: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1164
+ command = make_simple_command(:post, 'mylibrary/bookshelves/{shelf}/addVolume', options)
1165
+ command.params['shelf'] = shelf unless shelf.nil?
1166
+ command.query['reason'] = reason unless reason.nil?
1167
+ command.query['source'] = source unless source.nil?
1168
+ command.query['volumeId'] = volume_id unless volume_id.nil?
1169
+ command.query['fields'] = fields unless fields.nil?
1170
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1171
+ command.query['userIp'] = user_ip unless user_ip.nil?
1172
+ execute_or_queue_command(command, &block)
1173
+ end
1174
+
1175
+ # Clears all volumes from a bookshelf.
1176
+ # @param [String] shelf
1177
+ # ID of bookshelf from which to remove a volume.
1178
+ # @param [String] source
1179
+ # String to identify the originator of this request.
1180
+ # @param [String] fields
1181
+ # Selector specifying which fields to include in a partial response.
1182
+ # @param [String] quota_user
1183
+ # Available to use for quota purposes for server-side applications. Can be any
1184
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1185
+ # Overrides userIp if both are provided.
1186
+ # @param [String] user_ip
1187
+ # IP address of the site where the request originates. Use this if you want to
1188
+ # enforce per-user limits.
1189
+ # @param [Google::Apis::RequestOptions] options
1190
+ # Request-specific options
1191
+ #
1192
+ # @yield [result, err] Result & error if block supplied
1193
+ # @yieldparam result [NilClass] No result returned for this method
1194
+ # @yieldparam err [StandardError] error object if request failed
1195
+ #
1196
+ # @return [void]
1197
+ #
1198
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1199
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1200
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1201
+ def clear_my_library_volumes(shelf, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1202
+ command = make_simple_command(:post, 'mylibrary/bookshelves/{shelf}/clearVolumes', options)
1203
+ command.params['shelf'] = shelf unless shelf.nil?
1204
+ command.query['source'] = source unless source.nil?
1205
+ command.query['fields'] = fields unless fields.nil?
1206
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1207
+ command.query['userIp'] = user_ip unless user_ip.nil?
1208
+ execute_or_queue_command(command, &block)
1209
+ end
1210
+
1211
+ # Retrieves metadata for a specific bookshelf belonging to the authenticated
1212
+ # user.
1213
+ # @param [String] shelf
1214
+ # ID of bookshelf to retrieve.
1215
+ # @param [String] source
1216
+ # String to identify the originator of this request.
1217
+ # @param [String] fields
1218
+ # Selector specifying which fields to include in a partial response.
1219
+ # @param [String] quota_user
1220
+ # Available to use for quota purposes for server-side applications. Can be any
1221
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1222
+ # Overrides userIp if both are provided.
1223
+ # @param [String] user_ip
1224
+ # IP address of the site where the request originates. Use this if you want to
1225
+ # enforce per-user limits.
1226
+ # @param [Google::Apis::RequestOptions] options
1227
+ # Request-specific options
1228
+ #
1229
+ # @yield [result, err] Result & error if block supplied
1230
+ # @yieldparam result [Google::Apis::BooksV1::Bookshelf] parsed result object
1231
+ # @yieldparam err [StandardError] error object if request failed
1232
+ #
1233
+ # @return [Google::Apis::BooksV1::Bookshelf]
1234
+ #
1235
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1236
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1237
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1238
+ def get_my_library_bookshelf(shelf, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1239
+ command = make_simple_command(:get, 'mylibrary/bookshelves/{shelf}', options)
1240
+ command.response_representation = Google::Apis::BooksV1::Bookshelf::Representation
1241
+ command.response_class = Google::Apis::BooksV1::Bookshelf
1242
+ command.params['shelf'] = shelf unless shelf.nil?
1243
+ command.query['source'] = source unless source.nil?
1244
+ command.query['fields'] = fields unless fields.nil?
1245
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1246
+ command.query['userIp'] = user_ip unless user_ip.nil?
1247
+ execute_or_queue_command(command, &block)
1248
+ end
1249
+
1250
+ # Retrieves a list of bookshelves belonging to the authenticated user.
1251
+ # @param [String] source
1252
+ # String to identify the originator of this request.
1253
+ # @param [String] fields
1254
+ # Selector specifying which fields to include in a partial response.
1255
+ # @param [String] quota_user
1256
+ # Available to use for quota purposes for server-side applications. Can be any
1257
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1258
+ # Overrides userIp if both are provided.
1259
+ # @param [String] user_ip
1260
+ # IP address of the site where the request originates. Use this if you want to
1261
+ # enforce per-user limits.
1262
+ # @param [Google::Apis::RequestOptions] options
1263
+ # Request-specific options
1264
+ #
1265
+ # @yield [result, err] Result & error if block supplied
1266
+ # @yieldparam result [Google::Apis::BooksV1::Bookshelves] parsed result object
1267
+ # @yieldparam err [StandardError] error object if request failed
1268
+ #
1269
+ # @return [Google::Apis::BooksV1::Bookshelves]
1270
+ #
1271
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1272
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1273
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1274
+ def list_my_library_bookshelves(source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1275
+ command = make_simple_command(:get, 'mylibrary/bookshelves', options)
1276
+ command.response_representation = Google::Apis::BooksV1::Bookshelves::Representation
1277
+ command.response_class = Google::Apis::BooksV1::Bookshelves
1278
+ command.query['source'] = source unless source.nil?
1279
+ command.query['fields'] = fields unless fields.nil?
1280
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1281
+ command.query['userIp'] = user_ip unless user_ip.nil?
1282
+ execute_or_queue_command(command, &block)
1283
+ end
1284
+
1285
+ # Moves a volume within a bookshelf.
1286
+ # @param [String] shelf
1287
+ # ID of bookshelf with the volume.
1288
+ # @param [String] volume_id
1289
+ # ID of volume to move.
1290
+ # @param [Fixnum] volume_position
1291
+ # Position on shelf to move the item (0 puts the item before the current first
1292
+ # item, 1 puts it between the first and the second and so on.)
1293
+ # @param [String] source
1294
+ # String to identify the originator of this request.
1295
+ # @param [String] fields
1296
+ # Selector specifying which fields to include in a partial response.
1297
+ # @param [String] quota_user
1298
+ # Available to use for quota purposes for server-side applications. Can be any
1299
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1300
+ # Overrides userIp if both are provided.
1301
+ # @param [String] user_ip
1302
+ # IP address of the site where the request originates. Use this if you want to
1303
+ # enforce per-user limits.
1304
+ # @param [Google::Apis::RequestOptions] options
1305
+ # Request-specific options
1306
+ #
1307
+ # @yield [result, err] Result & error if block supplied
1308
+ # @yieldparam result [NilClass] No result returned for this method
1309
+ # @yieldparam err [StandardError] error object if request failed
1310
+ #
1311
+ # @return [void]
1312
+ #
1313
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1314
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1315
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1316
+ def move_my_library_volume(shelf, volume_id, volume_position, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1317
+ command = make_simple_command(:post, 'mylibrary/bookshelves/{shelf}/moveVolume', options)
1318
+ command.params['shelf'] = shelf unless shelf.nil?
1319
+ command.query['source'] = source unless source.nil?
1320
+ command.query['volumeId'] = volume_id unless volume_id.nil?
1321
+ command.query['volumePosition'] = volume_position unless volume_position.nil?
1322
+ command.query['fields'] = fields unless fields.nil?
1323
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1324
+ command.query['userIp'] = user_ip unless user_ip.nil?
1325
+ execute_or_queue_command(command, &block)
1326
+ end
1327
+
1328
+ # Removes a volume from a bookshelf.
1329
+ # @param [String] shelf
1330
+ # ID of bookshelf from which to remove a volume.
1331
+ # @param [String] volume_id
1332
+ # ID of volume to remove.
1333
+ # @param [String] reason
1334
+ # The reason for which the book is removed from the library.
1335
+ # @param [String] source
1336
+ # String to identify the originator of this request.
1337
+ # @param [String] fields
1338
+ # Selector specifying which fields to include in a partial response.
1339
+ # @param [String] quota_user
1340
+ # Available to use for quota purposes for server-side applications. Can be any
1341
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1342
+ # Overrides userIp if both are provided.
1343
+ # @param [String] user_ip
1344
+ # IP address of the site where the request originates. Use this if you want to
1345
+ # enforce per-user limits.
1346
+ # @param [Google::Apis::RequestOptions] options
1347
+ # Request-specific options
1348
+ #
1349
+ # @yield [result, err] Result & error if block supplied
1350
+ # @yieldparam result [NilClass] No result returned for this method
1351
+ # @yieldparam err [StandardError] error object if request failed
1352
+ #
1353
+ # @return [void]
1354
+ #
1355
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1356
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1357
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1358
+ def remove_my_library_volume(shelf, volume_id, reason: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1359
+ command = make_simple_command(:post, 'mylibrary/bookshelves/{shelf}/removeVolume', options)
1360
+ command.params['shelf'] = shelf unless shelf.nil?
1361
+ command.query['reason'] = reason unless reason.nil?
1362
+ command.query['source'] = source unless source.nil?
1363
+ command.query['volumeId'] = volume_id unless volume_id.nil?
1364
+ command.query['fields'] = fields unless fields.nil?
1365
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1366
+ command.query['userIp'] = user_ip unless user_ip.nil?
1367
+ execute_or_queue_command(command, &block)
1368
+ end
1369
+
1370
+ # Gets volume information for volumes on a bookshelf.
1371
+ # @param [String] shelf
1372
+ # The bookshelf ID or name retrieve volumes for.
1373
+ # @param [String] country
1374
+ # ISO-3166-1 code to override the IP-based location.
1375
+ # @param [Fixnum] max_results
1376
+ # Maximum number of results to return
1377
+ # @param [String] projection
1378
+ # Restrict information returned to a set of selected fields.
1379
+ # @param [String] q
1380
+ # Full-text search query string in this bookshelf.
1381
+ # @param [Boolean] show_preorders
1382
+ # Set to true to show pre-ordered books. Defaults to false.
1383
+ # @param [String] source
1384
+ # String to identify the originator of this request.
1385
+ # @param [Fixnum] start_index
1386
+ # Index of the first element to return (starts at 0)
1387
+ # @param [String] fields
1388
+ # Selector specifying which fields to include in a partial response.
1389
+ # @param [String] quota_user
1390
+ # Available to use for quota purposes for server-side applications. Can be any
1391
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1392
+ # Overrides userIp if both are provided.
1393
+ # @param [String] user_ip
1394
+ # IP address of the site where the request originates. Use this if you want to
1395
+ # enforce per-user limits.
1396
+ # @param [Google::Apis::RequestOptions] options
1397
+ # Request-specific options
1398
+ #
1399
+ # @yield [result, err] Result & error if block supplied
1400
+ # @yieldparam result [Google::Apis::BooksV1::Volumes] parsed result object
1401
+ # @yieldparam err [StandardError] error object if request failed
1402
+ #
1403
+ # @return [Google::Apis::BooksV1::Volumes]
1404
+ #
1405
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1406
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1407
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1408
+ def list_my_library_volumes(shelf, country: nil, max_results: nil, projection: nil, q: nil, show_preorders: nil, source: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1409
+ command = make_simple_command(:get, 'mylibrary/bookshelves/{shelf}/volumes', options)
1410
+ command.response_representation = Google::Apis::BooksV1::Volumes::Representation
1411
+ command.response_class = Google::Apis::BooksV1::Volumes
1412
+ command.params['shelf'] = shelf unless shelf.nil?
1413
+ command.query['country'] = country unless country.nil?
1414
+ command.query['maxResults'] = max_results unless max_results.nil?
1415
+ command.query['projection'] = projection unless projection.nil?
1416
+ command.query['q'] = q unless q.nil?
1417
+ command.query['showPreorders'] = show_preorders unless show_preorders.nil?
1418
+ command.query['source'] = source unless source.nil?
1419
+ command.query['startIndex'] = start_index unless start_index.nil?
1420
+ command.query['fields'] = fields unless fields.nil?
1421
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1422
+ command.query['userIp'] = user_ip unless user_ip.nil?
1423
+ execute_or_queue_command(command, &block)
1424
+ end
1425
+
1426
+ # Retrieves my reading position information for a volume.
1427
+ # @param [String] volume_id
1428
+ # ID of volume for which to retrieve a reading position.
1429
+ # @param [String] content_version
1430
+ # Volume content version for which this reading position is requested.
1431
+ # @param [String] source
1432
+ # String to identify the originator of this request.
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::BooksV1::ReadingPosition] parsed result object
1447
+ # @yieldparam err [StandardError] error object if request failed
1448
+ #
1449
+ # @return [Google::Apis::BooksV1::ReadingPosition]
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 get_my_library_reading_position(volume_id, content_version: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1455
+ command = make_simple_command(:get, 'mylibrary/readingpositions/{volumeId}', options)
1456
+ command.response_representation = Google::Apis::BooksV1::ReadingPosition::Representation
1457
+ command.response_class = Google::Apis::BooksV1::ReadingPosition
1458
+ command.params['volumeId'] = volume_id unless volume_id.nil?
1459
+ command.query['contentVersion'] = content_version unless content_version.nil?
1460
+ command.query['source'] = source unless source.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
+ # Sets my reading position information for a volume.
1468
+ # @param [String] volume_id
1469
+ # ID of volume for which to update the reading position.
1470
+ # @param [String] timestamp
1471
+ # RFC 3339 UTC format timestamp associated with this reading position.
1472
+ # @param [String] position
1473
+ # Position string for the new volume reading position.
1474
+ # @param [String] action
1475
+ # Action that caused this reading position to be set.
1476
+ # @param [String] content_version
1477
+ # Volume content version for which this reading position applies.
1478
+ # @param [String] device_cookie
1479
+ # Random persistent device cookie optional on set position.
1480
+ # @param [String] source
1481
+ # String to identify the originator of this request.
1482
+ # @param [String] fields
1483
+ # Selector specifying which fields to include in a partial response.
1484
+ # @param [String] quota_user
1485
+ # Available to use for quota purposes for server-side applications. Can be any
1486
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1487
+ # Overrides userIp if both are provided.
1488
+ # @param [String] user_ip
1489
+ # IP address of the site where the request originates. Use this if you want to
1490
+ # enforce per-user limits.
1491
+ # @param [Google::Apis::RequestOptions] options
1492
+ # Request-specific options
1493
+ #
1494
+ # @yield [result, err] Result & error if block supplied
1495
+ # @yieldparam result [NilClass] No result returned for this method
1496
+ # @yieldparam err [StandardError] error object if request failed
1497
+ #
1498
+ # @return [void]
1499
+ #
1500
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1501
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1502
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1503
+ def set_my_library_reading_position(volume_id, timestamp, position, action: nil, content_version: nil, device_cookie: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1504
+ command = make_simple_command(:post, 'mylibrary/readingpositions/{volumeId}/setPosition', options)
1505
+ command.params['volumeId'] = volume_id unless volume_id.nil?
1506
+ command.query['action'] = action unless action.nil?
1507
+ command.query['contentVersion'] = content_version unless content_version.nil?
1508
+ command.query['deviceCookie'] = device_cookie unless device_cookie.nil?
1509
+ command.query['position'] = position unless position.nil?
1510
+ command.query['source'] = source unless source.nil?
1511
+ command.query['timestamp'] = timestamp unless timestamp.nil?
1512
+ command.query['fields'] = fields unless fields.nil?
1513
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1514
+ command.query['userIp'] = user_ip unless user_ip.nil?
1515
+ execute_or_queue_command(command, &block)
1516
+ end
1517
+
1518
+ # Returns notification details for a given notification id.
1519
+ # @param [String] notification_id
1520
+ # String to identify the notification.
1521
+ # @param [String] locale
1522
+ # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for
1523
+ # generating notification title and body.
1524
+ # @param [String] source
1525
+ # String to identify the originator of this request.
1526
+ # @param [String] fields
1527
+ # Selector specifying which fields to include in a partial response.
1528
+ # @param [String] quota_user
1529
+ # Available to use for quota purposes for server-side applications. Can be any
1530
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1531
+ # Overrides userIp if both are provided.
1532
+ # @param [String] user_ip
1533
+ # IP address of the site where the request originates. Use this if you want to
1534
+ # enforce per-user limits.
1535
+ # @param [Google::Apis::RequestOptions] options
1536
+ # Request-specific options
1537
+ #
1538
+ # @yield [result, err] Result & error if block supplied
1539
+ # @yieldparam result [Google::Apis::BooksV1::Notification] parsed result object
1540
+ # @yieldparam err [StandardError] error object if request failed
1541
+ #
1542
+ # @return [Google::Apis::BooksV1::Notification]
1543
+ #
1544
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1545
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1546
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1547
+ def get_notification(notification_id, locale: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1548
+ command = make_simple_command(:get, 'notification/get', options)
1549
+ command.response_representation = Google::Apis::BooksV1::Notification::Representation
1550
+ command.response_class = Google::Apis::BooksV1::Notification
1551
+ command.query['locale'] = locale unless locale.nil?
1552
+ command.query['notification_id'] = notification_id unless notification_id.nil?
1553
+ command.query['source'] = source unless source.nil?
1554
+ command.query['fields'] = fields unless fields.nil?
1555
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1556
+ command.query['userIp'] = user_ip unless user_ip.nil?
1557
+ execute_or_queue_command(command, &block)
1558
+ end
1559
+
1560
+ # List categories for onboarding experience.
1561
+ # @param [String] locale
1562
+ # ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.
1563
+ # @param [String] fields
1564
+ # Selector specifying which fields to include in a partial response.
1565
+ # @param [String] quota_user
1566
+ # Available to use for quota purposes for server-side applications. Can be any
1567
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1568
+ # Overrides userIp if both are provided.
1569
+ # @param [String] user_ip
1570
+ # IP address of the site where the request originates. Use this if you want to
1571
+ # enforce per-user limits.
1572
+ # @param [Google::Apis::RequestOptions] options
1573
+ # Request-specific options
1574
+ #
1575
+ # @yield [result, err] Result & error if block supplied
1576
+ # @yieldparam result [Google::Apis::BooksV1::Category] parsed result object
1577
+ # @yieldparam err [StandardError] error object if request failed
1578
+ #
1579
+ # @return [Google::Apis::BooksV1::Category]
1580
+ #
1581
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1582
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1583
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1584
+ def list_onboarding_categories(locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1585
+ command = make_simple_command(:get, 'onboarding/listCategories', options)
1586
+ command.response_representation = Google::Apis::BooksV1::Category::Representation
1587
+ command.response_class = Google::Apis::BooksV1::Category
1588
+ command.query['locale'] = locale unless locale.nil?
1589
+ command.query['fields'] = fields unless fields.nil?
1590
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1591
+ command.query['userIp'] = user_ip unless user_ip.nil?
1592
+ execute_or_queue_command(command, &block)
1593
+ end
1594
+
1595
+ # List available volumes under categories for onboarding experience.
1596
+ # @param [Array<String>, String] category_id
1597
+ # List of category ids requested.
1598
+ # @param [String] locale
1599
+ # ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.
1600
+ # @param [String] max_allowed_maturity_rating
1601
+ # The maximum allowed maturity rating of returned volumes. Books with a higher
1602
+ # maturity rating are filtered out.
1603
+ # @param [Fixnum] page_size
1604
+ # Number of maximum results per page to be included in the response.
1605
+ # @param [String] page_token
1606
+ # The value of the nextToken from the previous page.
1607
+ # @param [String] fields
1608
+ # Selector specifying which fields to include in a partial response.
1609
+ # @param [String] quota_user
1610
+ # Available to use for quota purposes for server-side applications. Can be any
1611
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1612
+ # Overrides userIp if both are provided.
1613
+ # @param [String] user_ip
1614
+ # IP address of the site where the request originates. Use this if you want to
1615
+ # enforce per-user limits.
1616
+ # @param [Google::Apis::RequestOptions] options
1617
+ # Request-specific options
1618
+ #
1619
+ # @yield [result, err] Result & error if block supplied
1620
+ # @yieldparam result [Google::Apis::BooksV1::Volume2] parsed result object
1621
+ # @yieldparam err [StandardError] error object if request failed
1622
+ #
1623
+ # @return [Google::Apis::BooksV1::Volume2]
1624
+ #
1625
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1626
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1627
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1628
+ def list_onboarding_category_volumes(category_id: nil, locale: nil, max_allowed_maturity_rating: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1629
+ command = make_simple_command(:get, 'onboarding/listCategoryVolumes', options)
1630
+ command.response_representation = Google::Apis::BooksV1::Volume2::Representation
1631
+ command.response_class = Google::Apis::BooksV1::Volume2
1632
+ command.query['categoryId'] = category_id unless category_id.nil?
1633
+ command.query['locale'] = locale unless locale.nil?
1634
+ command.query['maxAllowedMaturityRating'] = max_allowed_maturity_rating unless max_allowed_maturity_rating.nil?
1635
+ command.query['pageSize'] = page_size unless page_size.nil?
1636
+ command.query['pageToken'] = page_token unless page_token.nil?
1637
+ command.query['fields'] = fields unless fields.nil?
1638
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1639
+ command.query['userIp'] = user_ip unless user_ip.nil?
1640
+ execute_or_queue_command(command, &block)
1641
+ end
1642
+
1643
+ # Returns a stream of personalized book clusters
1644
+ # @param [String] locale
1645
+ # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for
1646
+ # generating recommendations.
1647
+ # @param [String] max_allowed_maturity_rating
1648
+ # The maximum allowed maturity rating of returned recommendations. Books with a
1649
+ # higher maturity rating are filtered out.
1650
+ # @param [String] source
1651
+ # String to identify the originator of this request.
1652
+ # @param [String] fields
1653
+ # Selector specifying which fields to include in a partial response.
1654
+ # @param [String] quota_user
1655
+ # Available to use for quota purposes for server-side applications. Can be any
1656
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1657
+ # Overrides userIp if both are provided.
1658
+ # @param [String] user_ip
1659
+ # IP address of the site where the request originates. Use this if you want to
1660
+ # enforce per-user limits.
1661
+ # @param [Google::Apis::RequestOptions] options
1662
+ # Request-specific options
1663
+ #
1664
+ # @yield [result, err] Result & error if block supplied
1665
+ # @yieldparam result [Google::Apis::BooksV1::Discoveryclusters] parsed result object
1666
+ # @yieldparam err [StandardError] error object if request failed
1667
+ #
1668
+ # @return [Google::Apis::BooksV1::Discoveryclusters]
1669
+ #
1670
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1671
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1672
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1673
+ def get_personalizedstream(locale: nil, max_allowed_maturity_rating: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1674
+ command = make_simple_command(:get, 'personalizedstream/get', options)
1675
+ command.response_representation = Google::Apis::BooksV1::Discoveryclusters::Representation
1676
+ command.response_class = Google::Apis::BooksV1::Discoveryclusters
1677
+ command.query['locale'] = locale unless locale.nil?
1678
+ command.query['maxAllowedMaturityRating'] = max_allowed_maturity_rating unless max_allowed_maturity_rating.nil?
1679
+ command.query['source'] = source unless source.nil?
1680
+ command.query['fields'] = fields unless fields.nil?
1681
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1682
+ command.query['userIp'] = user_ip unless user_ip.nil?
1683
+ execute_or_queue_command(command, &block)
1684
+ end
1685
+
1686
+ #
1687
+ # @param [String] android_id
1688
+ # device android_id
1689
+ # @param [String] device
1690
+ # device device
1691
+ # @param [String] manufacturer
1692
+ # device manufacturer
1693
+ # @param [String] model
1694
+ # device model
1695
+ # @param [String] offer_id
1696
+ # @param [String] product
1697
+ # device product
1698
+ # @param [String] serial
1699
+ # device serial
1700
+ # @param [String] volume_id
1701
+ # Volume id to exercise the offer
1702
+ # @param [String] fields
1703
+ # Selector specifying which fields to include in a partial response.
1704
+ # @param [String] quota_user
1705
+ # Available to use for quota purposes for server-side applications. Can be any
1706
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1707
+ # Overrides userIp if both are provided.
1708
+ # @param [String] user_ip
1709
+ # IP address of the site where the request originates. Use this if you want to
1710
+ # enforce per-user limits.
1711
+ # @param [Google::Apis::RequestOptions] options
1712
+ # Request-specific options
1713
+ #
1714
+ # @yield [result, err] Result & error if block supplied
1715
+ # @yieldparam result [NilClass] No result returned for this method
1716
+ # @yieldparam err [StandardError] error object if request failed
1717
+ #
1718
+ # @return [void]
1719
+ #
1720
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1721
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1722
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1723
+ def accept_promo_offer(android_id: nil, device: nil, manufacturer: nil, model: nil, offer_id: nil, product: nil, serial: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1724
+ command = make_simple_command(:post, 'promooffer/accept', options)
1725
+ command.query['androidId'] = android_id unless android_id.nil?
1726
+ command.query['device'] = device unless device.nil?
1727
+ command.query['manufacturer'] = manufacturer unless manufacturer.nil?
1728
+ command.query['model'] = model unless model.nil?
1729
+ command.query['offerId'] = offer_id unless offer_id.nil?
1730
+ command.query['product'] = product unless product.nil?
1731
+ command.query['serial'] = serial unless serial.nil?
1732
+ command.query['volumeId'] = volume_id unless volume_id.nil?
1733
+ command.query['fields'] = fields unless fields.nil?
1734
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1735
+ command.query['userIp'] = user_ip unless user_ip.nil?
1736
+ execute_or_queue_command(command, &block)
1737
+ end
1738
+
1739
+ #
1740
+ # @param [String] android_id
1741
+ # device android_id
1742
+ # @param [String] device
1743
+ # device device
1744
+ # @param [String] manufacturer
1745
+ # device manufacturer
1746
+ # @param [String] model
1747
+ # device model
1748
+ # @param [String] offer_id
1749
+ # Offer to dimiss
1750
+ # @param [String] product
1751
+ # device product
1752
+ # @param [String] serial
1753
+ # device serial
1754
+ # @param [String] fields
1755
+ # Selector specifying which fields to include in a partial response.
1756
+ # @param [String] quota_user
1757
+ # Available to use for quota purposes for server-side applications. Can be any
1758
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1759
+ # Overrides userIp if both are provided.
1760
+ # @param [String] user_ip
1761
+ # IP address of the site where the request originates. Use this if you want to
1762
+ # enforce per-user limits.
1763
+ # @param [Google::Apis::RequestOptions] options
1764
+ # Request-specific options
1765
+ #
1766
+ # @yield [result, err] Result & error if block supplied
1767
+ # @yieldparam result [NilClass] No result returned for this method
1768
+ # @yieldparam err [StandardError] error object if request failed
1769
+ #
1770
+ # @return [void]
1771
+ #
1772
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1773
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1774
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1775
+ def dismiss_promo_offer(android_id: nil, device: nil, manufacturer: nil, model: nil, offer_id: nil, product: nil, serial: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1776
+ command = make_simple_command(:post, 'promooffer/dismiss', options)
1777
+ command.query['androidId'] = android_id unless android_id.nil?
1778
+ command.query['device'] = device unless device.nil?
1779
+ command.query['manufacturer'] = manufacturer unless manufacturer.nil?
1780
+ command.query['model'] = model unless model.nil?
1781
+ command.query['offerId'] = offer_id unless offer_id.nil?
1782
+ command.query['product'] = product unless product.nil?
1783
+ command.query['serial'] = serial unless serial.nil?
1784
+ command.query['fields'] = fields unless fields.nil?
1785
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1786
+ command.query['userIp'] = user_ip unless user_ip.nil?
1787
+ execute_or_queue_command(command, &block)
1788
+ end
1789
+
1790
+ # Returns a list of promo offers available to the user
1791
+ # @param [String] android_id
1792
+ # device android_id
1793
+ # @param [String] device
1794
+ # device device
1795
+ # @param [String] manufacturer
1796
+ # device manufacturer
1797
+ # @param [String] model
1798
+ # device model
1799
+ # @param [String] product
1800
+ # device product
1801
+ # @param [String] serial
1802
+ # device serial
1803
+ # @param [String] fields
1804
+ # Selector specifying which fields to include in a partial response.
1805
+ # @param [String] quota_user
1806
+ # Available to use for quota purposes for server-side applications. Can be any
1807
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1808
+ # Overrides userIp if both are provided.
1809
+ # @param [String] user_ip
1810
+ # IP address of the site where the request originates. Use this if you want to
1811
+ # enforce per-user limits.
1812
+ # @param [Google::Apis::RequestOptions] options
1813
+ # Request-specific options
1814
+ #
1815
+ # @yield [result, err] Result & error if block supplied
1816
+ # @yieldparam result [Google::Apis::BooksV1::Offers] parsed result object
1817
+ # @yieldparam err [StandardError] error object if request failed
1818
+ #
1819
+ # @return [Google::Apis::BooksV1::Offers]
1820
+ #
1821
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1822
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1823
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1824
+ def get_promo_offer(android_id: nil, device: nil, manufacturer: nil, model: nil, product: nil, serial: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1825
+ command = make_simple_command(:get, 'promooffer/get', options)
1826
+ command.response_representation = Google::Apis::BooksV1::Offers::Representation
1827
+ command.response_class = Google::Apis::BooksV1::Offers
1828
+ command.query['androidId'] = android_id unless android_id.nil?
1829
+ command.query['device'] = device unless device.nil?
1830
+ command.query['manufacturer'] = manufacturer unless manufacturer.nil?
1831
+ command.query['model'] = model unless model.nil?
1832
+ command.query['product'] = product unless product.nil?
1833
+ command.query['serial'] = serial unless serial.nil?
1834
+ command.query['fields'] = fields unless fields.nil?
1835
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1836
+ command.query['userIp'] = user_ip unless user_ip.nil?
1837
+ execute_or_queue_command(command, &block)
1838
+ end
1839
+
1840
+ # Returns Series metadata for the given series ids.
1841
+ # @param [Array<String>, String] series_id
1842
+ # String that identifies the series
1843
+ # @param [String] fields
1844
+ # Selector specifying which fields to include in a partial response.
1845
+ # @param [String] quota_user
1846
+ # Available to use for quota purposes for server-side applications. Can be any
1847
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1848
+ # Overrides userIp if both are provided.
1849
+ # @param [String] user_ip
1850
+ # IP address of the site where the request originates. Use this if you want to
1851
+ # enforce per-user limits.
1852
+ # @param [Google::Apis::RequestOptions] options
1853
+ # Request-specific options
1854
+ #
1855
+ # @yield [result, err] Result & error if block supplied
1856
+ # @yieldparam result [Google::Apis::BooksV1::Series] parsed result object
1857
+ # @yieldparam err [StandardError] error object if request failed
1858
+ #
1859
+ # @return [Google::Apis::BooksV1::Series]
1860
+ #
1861
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1862
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1863
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1864
+ def get_series(series_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1865
+ command = make_simple_command(:get, 'series/get', options)
1866
+ command.response_representation = Google::Apis::BooksV1::Series::Representation
1867
+ command.response_class = Google::Apis::BooksV1::Series
1868
+ command.query['series_id'] = series_id unless series_id.nil?
1869
+ command.query['fields'] = fields unless fields.nil?
1870
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1871
+ command.query['userIp'] = user_ip unless user_ip.nil?
1872
+ execute_or_queue_command(command, &block)
1873
+ end
1874
+
1875
+ # Returns Series membership data given the series id.
1876
+ # @param [String] series_id
1877
+ # String that identifies the series
1878
+ # @param [Fixnum] page_size
1879
+ # Number of maximum results per page to be included in the response.
1880
+ # @param [String] page_token
1881
+ # The value of the nextToken from the previous page.
1882
+ # @param [String] fields
1883
+ # Selector specifying which fields to include in a partial response.
1884
+ # @param [String] quota_user
1885
+ # Available to use for quota purposes for server-side applications. Can be any
1886
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1887
+ # Overrides userIp if both are provided.
1888
+ # @param [String] user_ip
1889
+ # IP address of the site where the request originates. Use this if you want to
1890
+ # enforce per-user limits.
1891
+ # @param [Google::Apis::RequestOptions] options
1892
+ # Request-specific options
1893
+ #
1894
+ # @yield [result, err] Result & error if block supplied
1895
+ # @yieldparam result [Google::Apis::BooksV1::SeriesMembership] parsed result object
1896
+ # @yieldparam err [StandardError] error object if request failed
1897
+ #
1898
+ # @return [Google::Apis::BooksV1::SeriesMembership]
1899
+ #
1900
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1901
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1902
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1903
+ def get_series_membership(series_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1904
+ command = make_simple_command(:get, 'series/membership/get', options)
1905
+ command.response_representation = Google::Apis::BooksV1::SeriesMembership::Representation
1906
+ command.response_class = Google::Apis::BooksV1::SeriesMembership
1907
+ command.query['page_size'] = page_size unless page_size.nil?
1908
+ command.query['page_token'] = page_token unless page_token.nil?
1909
+ command.query['series_id'] = series_id unless series_id.nil?
1910
+ command.query['fields'] = fields unless fields.nil?
1911
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1912
+ command.query['userIp'] = user_ip unless user_ip.nil?
1913
+ execute_or_queue_command(command, &block)
1914
+ end
1915
+
1916
+ # Gets volume information for a single volume.
1917
+ # @param [String] volume_id
1918
+ # ID of volume to retrieve.
1919
+ # @param [String] country
1920
+ # ISO-3166-1 code to override the IP-based location.
1921
+ # @param [String] partner
1922
+ # Brand results for partner ID.
1923
+ # @param [String] projection
1924
+ # Restrict information returned to a set of selected fields.
1925
+ # @param [String] source
1926
+ # String to identify the originator of this request.
1927
+ # @param [Boolean] user_library_consistent_read
1928
+ # @param [String] fields
1929
+ # Selector specifying which fields to include in a partial response.
1930
+ # @param [String] quota_user
1931
+ # Available to use for quota purposes for server-side applications. Can be any
1932
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1933
+ # Overrides userIp if both are provided.
1934
+ # @param [String] user_ip
1935
+ # IP address of the site where the request originates. Use this if you want to
1936
+ # enforce per-user limits.
1937
+ # @param [Google::Apis::RequestOptions] options
1938
+ # Request-specific options
1939
+ #
1940
+ # @yield [result, err] Result & error if block supplied
1941
+ # @yieldparam result [Google::Apis::BooksV1::Volume] parsed result object
1942
+ # @yieldparam err [StandardError] error object if request failed
1943
+ #
1944
+ # @return [Google::Apis::BooksV1::Volume]
1945
+ #
1946
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1947
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1948
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1949
+ def get_volume(volume_id, country: nil, partner: nil, projection: nil, source: nil, user_library_consistent_read: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1950
+ command = make_simple_command(:get, 'volumes/{volumeId}', options)
1951
+ command.response_representation = Google::Apis::BooksV1::Volume::Representation
1952
+ command.response_class = Google::Apis::BooksV1::Volume
1953
+ command.params['volumeId'] = volume_id unless volume_id.nil?
1954
+ command.query['country'] = country unless country.nil?
1955
+ command.query['partner'] = partner unless partner.nil?
1956
+ command.query['projection'] = projection unless projection.nil?
1957
+ command.query['source'] = source unless source.nil?
1958
+ command.query['user_library_consistent_read'] = user_library_consistent_read unless user_library_consistent_read.nil?
1959
+ command.query['fields'] = fields unless fields.nil?
1960
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1961
+ command.query['userIp'] = user_ip unless user_ip.nil?
1962
+ execute_or_queue_command(command, &block)
1963
+ end
1964
+
1965
+ # Performs a book search.
1966
+ # @param [String] q
1967
+ # Full-text search query string.
1968
+ # @param [String] download
1969
+ # Restrict to volumes by download availability.
1970
+ # @param [String] filter
1971
+ # Filter search results.
1972
+ # @param [String] lang_restrict
1973
+ # Restrict results to books with this language code.
1974
+ # @param [String] library_restrict
1975
+ # Restrict search to this user's library.
1976
+ # @param [Fixnum] max_results
1977
+ # Maximum number of results to return.
1978
+ # @param [String] order_by
1979
+ # Sort search results.
1980
+ # @param [String] partner
1981
+ # Restrict and brand results for partner ID.
1982
+ # @param [String] print_type
1983
+ # Restrict to books or magazines.
1984
+ # @param [String] projection
1985
+ # Restrict information returned to a set of selected fields.
1986
+ # @param [Boolean] show_preorders
1987
+ # Set to true to show books available for preorder. Defaults to false.
1988
+ # @param [String] source
1989
+ # String to identify the originator of this request.
1990
+ # @param [Fixnum] start_index
1991
+ # Index of the first result to return (starts at 0)
1992
+ # @param [String] fields
1993
+ # Selector specifying which fields to include in a partial response.
1994
+ # @param [String] quota_user
1995
+ # Available to use for quota purposes for server-side applications. Can be any
1996
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1997
+ # Overrides userIp if both are provided.
1998
+ # @param [String] user_ip
1999
+ # IP address of the site where the request originates. Use this if you want to
2000
+ # enforce per-user limits.
2001
+ # @param [Google::Apis::RequestOptions] options
2002
+ # Request-specific options
2003
+ #
2004
+ # @yield [result, err] Result & error if block supplied
2005
+ # @yieldparam result [Google::Apis::BooksV1::Volumes] parsed result object
2006
+ # @yieldparam err [StandardError] error object if request failed
2007
+ #
2008
+ # @return [Google::Apis::BooksV1::Volumes]
2009
+ #
2010
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2011
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2012
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2013
+ def list_volumes(q, download: nil, filter: nil, lang_restrict: nil, library_restrict: nil, max_results: nil, order_by: nil, partner: nil, print_type: nil, projection: nil, show_preorders: nil, source: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2014
+ command = make_simple_command(:get, 'volumes', options)
2015
+ command.response_representation = Google::Apis::BooksV1::Volumes::Representation
2016
+ command.response_class = Google::Apis::BooksV1::Volumes
2017
+ command.query['download'] = download unless download.nil?
2018
+ command.query['filter'] = filter unless filter.nil?
2019
+ command.query['langRestrict'] = lang_restrict unless lang_restrict.nil?
2020
+ command.query['libraryRestrict'] = library_restrict unless library_restrict.nil?
2021
+ command.query['maxResults'] = max_results unless max_results.nil?
2022
+ command.query['orderBy'] = order_by unless order_by.nil?
2023
+ command.query['partner'] = partner unless partner.nil?
2024
+ command.query['printType'] = print_type unless print_type.nil?
2025
+ command.query['projection'] = projection unless projection.nil?
2026
+ command.query['q'] = q unless q.nil?
2027
+ command.query['showPreorders'] = show_preorders unless show_preorders.nil?
2028
+ command.query['source'] = source unless source.nil?
2029
+ command.query['startIndex'] = start_index unless start_index.nil?
2030
+ command.query['fields'] = fields unless fields.nil?
2031
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2032
+ command.query['userIp'] = user_ip unless user_ip.nil?
2033
+ execute_or_queue_command(command, &block)
2034
+ end
2035
+
2036
+ # Return a list of associated books.
2037
+ # @param [String] volume_id
2038
+ # ID of the source volume.
2039
+ # @param [String] association
2040
+ # Association type.
2041
+ # @param [String] locale
2042
+ # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for
2043
+ # generating recommendations.
2044
+ # @param [String] max_allowed_maturity_rating
2045
+ # The maximum allowed maturity rating of returned recommendations. Books with a
2046
+ # higher maturity rating are filtered out.
2047
+ # @param [String] source
2048
+ # String to identify the originator of this request.
2049
+ # @param [String] fields
2050
+ # Selector specifying which fields to include in a partial response.
2051
+ # @param [String] quota_user
2052
+ # Available to use for quota purposes for server-side applications. Can be any
2053
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2054
+ # Overrides userIp if both are provided.
2055
+ # @param [String] user_ip
2056
+ # IP address of the site where the request originates. Use this if you want to
2057
+ # enforce per-user limits.
2058
+ # @param [Google::Apis::RequestOptions] options
2059
+ # Request-specific options
2060
+ #
2061
+ # @yield [result, err] Result & error if block supplied
2062
+ # @yieldparam result [Google::Apis::BooksV1::Volumes] parsed result object
2063
+ # @yieldparam err [StandardError] error object if request failed
2064
+ #
2065
+ # @return [Google::Apis::BooksV1::Volumes]
2066
+ #
2067
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2068
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2069
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2070
+ def list_associated_volumes(volume_id, association: nil, locale: nil, max_allowed_maturity_rating: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2071
+ command = make_simple_command(:get, 'volumes/{volumeId}/associated', options)
2072
+ command.response_representation = Google::Apis::BooksV1::Volumes::Representation
2073
+ command.response_class = Google::Apis::BooksV1::Volumes
2074
+ command.params['volumeId'] = volume_id unless volume_id.nil?
2075
+ command.query['association'] = association unless association.nil?
2076
+ command.query['locale'] = locale unless locale.nil?
2077
+ command.query['maxAllowedMaturityRating'] = max_allowed_maturity_rating unless max_allowed_maturity_rating.nil?
2078
+ command.query['source'] = source unless source.nil?
2079
+ command.query['fields'] = fields unless fields.nil?
2080
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2081
+ command.query['userIp'] = user_ip unless user_ip.nil?
2082
+ execute_or_queue_command(command, &block)
2083
+ end
2084
+
2085
+ # Return a list of books in My Library.
2086
+ # @param [Array<String>, String] acquire_method
2087
+ # How the book was aquired
2088
+ # @param [String] locale
2089
+ # ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for
2090
+ # generating recommendations.
2091
+ # @param [Fixnum] max_results
2092
+ # Maximum number of results to return.
2093
+ # @param [Array<String>, String] processing_state
2094
+ # The processing state of the user uploaded volumes to be returned. Applicable
2095
+ # only if the UPLOADED is specified in the acquireMethod.
2096
+ # @param [String] source
2097
+ # String to identify the originator of this request.
2098
+ # @param [Fixnum] start_index
2099
+ # Index of the first result to return (starts at 0)
2100
+ # @param [String] fields
2101
+ # Selector specifying which fields to include in a partial response.
2102
+ # @param [String] quota_user
2103
+ # Available to use for quota purposes for server-side applications. Can be any
2104
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2105
+ # Overrides userIp if both are provided.
2106
+ # @param [String] user_ip
2107
+ # IP address of the site where the request originates. Use this if you want to
2108
+ # enforce per-user limits.
2109
+ # @param [Google::Apis::RequestOptions] options
2110
+ # Request-specific options
2111
+ #
2112
+ # @yield [result, err] Result & error if block supplied
2113
+ # @yieldparam result [Google::Apis::BooksV1::Volumes] parsed result object
2114
+ # @yieldparam err [StandardError] error object if request failed
2115
+ #
2116
+ # @return [Google::Apis::BooksV1::Volumes]
2117
+ #
2118
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2119
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2120
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2121
+ def list_my_books(acquire_method: nil, locale: nil, max_results: nil, processing_state: nil, source: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2122
+ command = make_simple_command(:get, 'volumes/mybooks', options)
2123
+ command.response_representation = Google::Apis::BooksV1::Volumes::Representation
2124
+ command.response_class = Google::Apis::BooksV1::Volumes
2125
+ command.query['acquireMethod'] = acquire_method unless acquire_method.nil?
2126
+ command.query['locale'] = locale unless locale.nil?
2127
+ command.query['maxResults'] = max_results unless max_results.nil?
2128
+ command.query['processingState'] = processing_state unless processing_state.nil?
2129
+ command.query['source'] = source unless source.nil?
2130
+ command.query['startIndex'] = start_index unless start_index.nil?
2131
+ command.query['fields'] = fields unless fields.nil?
2132
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2133
+ command.query['userIp'] = user_ip unless user_ip.nil?
2134
+ execute_or_queue_command(command, &block)
2135
+ end
2136
+
2137
+ # Return a list of recommended books for the current user.
2138
+ # @param [String] locale
2139
+ # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for
2140
+ # generating recommendations.
2141
+ # @param [String] max_allowed_maturity_rating
2142
+ # The maximum allowed maturity rating of returned recommendations. Books with a
2143
+ # higher maturity rating are filtered out.
2144
+ # @param [String] source
2145
+ # String to identify the originator of this request.
2146
+ # @param [Array<String>, String] target_ids
2147
+ # List of target ids used for experiments or user segments
2148
+ # @param [String] fields
2149
+ # Selector specifying which fields to include in a partial response.
2150
+ # @param [String] quota_user
2151
+ # Available to use for quota purposes for server-side applications. Can be any
2152
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2153
+ # Overrides userIp if both are provided.
2154
+ # @param [String] user_ip
2155
+ # IP address of the site where the request originates. Use this if you want to
2156
+ # enforce per-user limits.
2157
+ # @param [Google::Apis::RequestOptions] options
2158
+ # Request-specific options
2159
+ #
2160
+ # @yield [result, err] Result & error if block supplied
2161
+ # @yieldparam result [Google::Apis::BooksV1::Volumes] parsed result object
2162
+ # @yieldparam err [StandardError] error object if request failed
2163
+ #
2164
+ # @return [Google::Apis::BooksV1::Volumes]
2165
+ #
2166
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2167
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2168
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2169
+ def list_recommended_volumes(locale: nil, max_allowed_maturity_rating: nil, source: nil, target_ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2170
+ command = make_simple_command(:get, 'volumes/recommended', options)
2171
+ command.response_representation = Google::Apis::BooksV1::Volumes::Representation
2172
+ command.response_class = Google::Apis::BooksV1::Volumes
2173
+ command.query['locale'] = locale unless locale.nil?
2174
+ command.query['maxAllowedMaturityRating'] = max_allowed_maturity_rating unless max_allowed_maturity_rating.nil?
2175
+ command.query['source'] = source unless source.nil?
2176
+ command.query['targetIds'] = target_ids unless target_ids.nil?
2177
+ command.query['fields'] = fields unless fields.nil?
2178
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2179
+ command.query['userIp'] = user_ip unless user_ip.nil?
2180
+ execute_or_queue_command(command, &block)
2181
+ end
2182
+
2183
+ # Rate a recommended book for the current user.
2184
+ # @param [String] rating
2185
+ # Rating to be given to the volume.
2186
+ # @param [String] volume_id
2187
+ # ID of the source volume.
2188
+ # @param [String] locale
2189
+ # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for
2190
+ # generating recommendations.
2191
+ # @param [String] source
2192
+ # String to identify the originator of this request.
2193
+ # @param [String] fields
2194
+ # Selector specifying which fields to include in a partial response.
2195
+ # @param [String] quota_user
2196
+ # Available to use for quota purposes for server-side applications. Can be any
2197
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2198
+ # Overrides userIp if both are provided.
2199
+ # @param [String] user_ip
2200
+ # IP address of the site where the request originates. Use this if you want to
2201
+ # enforce per-user limits.
2202
+ # @param [Google::Apis::RequestOptions] options
2203
+ # Request-specific options
2204
+ #
2205
+ # @yield [result, err] Result & error if block supplied
2206
+ # @yieldparam result [Google::Apis::BooksV1::RateRecommendedVolumeResponse] parsed result object
2207
+ # @yieldparam err [StandardError] error object if request failed
2208
+ #
2209
+ # @return [Google::Apis::BooksV1::RateRecommendedVolumeResponse]
2210
+ #
2211
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2212
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2213
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2214
+ def rate_recommended_volume(rating, volume_id, locale: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2215
+ command = make_simple_command(:post, 'volumes/recommended/rate', options)
2216
+ command.response_representation = Google::Apis::BooksV1::RateRecommendedVolumeResponse::Representation
2217
+ command.response_class = Google::Apis::BooksV1::RateRecommendedVolumeResponse
2218
+ command.query['locale'] = locale unless locale.nil?
2219
+ command.query['rating'] = rating unless rating.nil?
2220
+ command.query['source'] = source unless source.nil?
2221
+ command.query['volumeId'] = volume_id unless volume_id.nil?
2222
+ command.query['fields'] = fields unless fields.nil?
2223
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2224
+ command.query['userIp'] = user_ip unless user_ip.nil?
2225
+ execute_or_queue_command(command, &block)
2226
+ end
2227
+
2228
+ # Return a list of books uploaded by the current user.
2229
+ # @param [String] locale
2230
+ # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for
2231
+ # generating recommendations.
2232
+ # @param [Fixnum] max_results
2233
+ # Maximum number of results to return.
2234
+ # @param [Array<String>, String] processing_state
2235
+ # The processing state of the user uploaded volumes to be returned.
2236
+ # @param [String] source
2237
+ # String to identify the originator of this request.
2238
+ # @param [Fixnum] start_index
2239
+ # Index of the first result to return (starts at 0)
2240
+ # @param [Array<String>, String] volume_id
2241
+ # The ids of the volumes to be returned. If not specified all that match the
2242
+ # processingState are returned.
2243
+ # @param [String] fields
2244
+ # Selector specifying which fields to include in a partial response.
2245
+ # @param [String] quota_user
2246
+ # Available to use for quota purposes for server-side applications. Can be any
2247
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2248
+ # Overrides userIp if both are provided.
2249
+ # @param [String] user_ip
2250
+ # IP address of the site where the request originates. Use this if you want to
2251
+ # enforce per-user limits.
2252
+ # @param [Google::Apis::RequestOptions] options
2253
+ # Request-specific options
2254
+ #
2255
+ # @yield [result, err] Result & error if block supplied
2256
+ # @yieldparam result [Google::Apis::BooksV1::Volumes] parsed result object
2257
+ # @yieldparam err [StandardError] error object if request failed
2258
+ #
2259
+ # @return [Google::Apis::BooksV1::Volumes]
2260
+ #
2261
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2262
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2263
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2264
+ def list_user_uploaded_volumes(locale: nil, max_results: nil, processing_state: nil, source: nil, start_index: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2265
+ command = make_simple_command(:get, 'volumes/useruploaded', options)
2266
+ command.response_representation = Google::Apis::BooksV1::Volumes::Representation
2267
+ command.response_class = Google::Apis::BooksV1::Volumes
2268
+ command.query['locale'] = locale unless locale.nil?
2269
+ command.query['maxResults'] = max_results unless max_results.nil?
2270
+ command.query['processingState'] = processing_state unless processing_state.nil?
2271
+ command.query['source'] = source unless source.nil?
2272
+ command.query['startIndex'] = start_index unless start_index.nil?
2273
+ command.query['volumeId'] = volume_id unless volume_id.nil?
2274
+ command.query['fields'] = fields unless fields.nil?
2275
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2276
+ command.query['userIp'] = user_ip unless user_ip.nil?
2277
+ execute_or_queue_command(command, &block)
2278
+ end
2279
+
2280
+ protected
2281
+
2282
+ def apply_command_defaults(command)
2283
+ command.query['key'] = key unless key.nil?
2284
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2285
+ command.query['userIp'] = user_ip unless user_ip.nil?
2286
+ end
2287
+ end
2288
+ end
2289
+ end
2290
+ end