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