John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="books_v1.html">Books API</a> . <a href="books_v1.volumes.html">volumes</a> . <a href="books_v1.volumes.recommended.html">recommended</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#list">list(source=None, locale=None)</a></code></p> |
| 79 | <p class="firstline">Return a list of recommended books for the current user.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#rate">rate(rating, volumeId, source=None, locale=None)</a></code></p> |
| 82 | <p class="firstline">Rate a recommended book for the current user.</p> |
| 83 | <h3>Method Details</h3> |
| 84 | <div class="method"> |
| 85 | <code class="details" id="list">list(source=None, locale=None)</code> |
| 86 | <pre>Return a list of recommended books for the current user. |
| 87 | |
| 88 | Args: |
| 89 | source: string, String to identify the originator of this request. |
| 90 | locale: string, ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. |
| 91 | |
| 92 | Returns: |
| 93 | An object of the form: |
| 94 | |
| 95 | { |
| 96 | "totalItems": 42, # Total number of volumes found. This might be greater than the number of volumes returned in this response if results have been paginated. |
| 97 | "items": [ # A list of volumes. |
| 98 | { |
| 99 | "kind": "books#volume", # Resource type for a volume. (In LITE projection.) |
| 100 | "accessInfo": { # Any information about a volume related to reading or obtaining that volume text. This information can depend on country (books may be public domain in one country but not in another, e.g.). |
| 101 | "webReaderLink": "A String", # URL to read this volume on the Google Books site. Link will not allow users to read non-viewable volumes. |
| 102 | "publicDomain": True or False, # Whether or not this book is public domain in the country listed above. |
| 103 | "embeddable": True or False, # Whether this volume can be embedded in a viewport using the Embedded Viewer API. |
| 104 | "downloadAccess": { # Information about a volume's download license access restrictions. |
| 105 | "nonce": "A String", # Client nonce for verification. Download access and client-validation only. |
| 106 | "kind": "books#downloadAccessRestriction", # Resource type. |
| 107 | "justAcquired": True or False, # If deviceAllowed, whether access was just acquired with this request. |
| 108 | "maxDownloadDevices": 42, # If restricted, the maximum number of content download licenses for this volume. |
| 109 | "downloadsAcquired": 42, # If restricted, the number of content download licenses already acquired (including the requesting client, if licensed). |
| 110 | "signature": "A String", # Response signature. |
| 111 | "volumeId": "A String", # Identifies the volume for which this entry applies. |
| 112 | "deviceAllowed": True or False, # If restricted, whether access is granted for this (user, device, volume). |
| 113 | "source": "A String", # Client app identifier for verification. Download access and client-validation only. |
| 114 | "restricted": True or False, # Whether this volume has any download access restrictions. |
| 115 | "reasonCode": "A String", # Error/warning reason code. Additional codes may be added in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 WARNING_USED_LAST_ACCESS |
| 116 | "message": "A String", # Error/warning message. |
| 117 | }, |
| 118 | "country": "A String", # The two-letter ISO_3166-1 country code for which this access information is valid. (In LITE projection.) |
| 119 | "quoteSharingAllowed": True or False, # Whether quote sharing is allowed for this volume. |
| 120 | "viewOrderUrl": "A String", # For ordered but not yet processed orders, we give a URL that can be used to go to the appropriate Google Wallet page. |
| 121 | "textToSpeechPermission": "A String", # Whether text-to-speech is permitted for this volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED. |
| 122 | "driveImportedContentLink": "A String", # URL to the Google Drive viewer if this volume is uploaded by the user by selecting the file from Google Drive. |
| 123 | "pdf": { # Information about pdf content. (In LITE projection.) |
| 124 | "isAvailable": True or False, # Is a scanned image pdf available either as public domain or for purchase. (In LITE projection.) |
| 125 | "downloadLink": "A String", # URL to download pdf. (In LITE projection.) |
| 126 | "acsTokenLink": "A String", # URL to retrieve ACS token for pdf download. (In LITE projection.) |
| 127 | }, |
| 128 | "explicitOfflineLicenseManagement": True or False, # Whether this volume requires that the client explicitly request offline download license rather than have it done automatically when loading the content, if the client supports it. |
| 129 | "viewability": "A String", # The read access of a volume. Possible values are PARTIAL, ALL_PAGES, NO_PAGES or UNKNOWN. This value depends on the country listed above. A value of PARTIAL means that the publisher has allowed some portion of the volume to be viewed publicly, without purchase. This can apply to eBooks as well as non-eBooks. Public domain books will always have a value of ALL_PAGES. |
| 130 | "epub": { # Information about epub content. (In LITE projection.) |
| 131 | "isAvailable": True or False, # Is a flowing text epub available either as public domain or for purchase. (In LITE projection.) |
| 132 | "downloadLink": "A String", # URL to download epub. (In LITE projection.) |
| 133 | "acsTokenLink": "A String", # URL to retrieve ACS token for epub download. (In LITE projection.) |
| 134 | }, |
| 135 | "accessViewStatus": "A String", # Combines the access and viewability of this volume into a single status field for this user. Values can be FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or NONE. (In LITE projection.) |
| 136 | }, |
| 137 | "searchInfo": { # Search result information related to this volume. |
| 138 | "textSnippet": "A String", # A text snippet containing the search query. |
| 139 | }, |
| 140 | "saleInfo": { # Any information about a volume related to the eBookstore and/or purchaseability. This information can depend on the country where the request originates from (i.e. books may not be for sale in certain countries). |
| 141 | "country": "A String", # The two-letter ISO_3166-1 country code for which this sale information is valid. (In LITE projection.) |
| 142 | "retailPrice": { # The actual selling price of the book. This is the same as the suggested retail or list price unless there are offers or discounts on this volume. (In LITE projection.) |
| 143 | "amount": 3.14, # Amount in the currency listed below. (In LITE projection.) |
| 144 | "currencyCode": "A String", # An ISO 4217, three-letter currency code. (In LITE projection.) |
| 145 | }, |
| 146 | "isEbook": True or False, # Whether or not this volume is an eBook (can be added to the My eBooks shelf). |
| 147 | "offers": [ # Offers available for this volume (sales and rentals). |
| 148 | { |
| 149 | "rentalDuration": { # The rental duration (for rental offers only). |
| 150 | "count": 3.14, |
| 151 | "unit": "A String", |
| 152 | }, |
| 153 | "retailPrice": { # Offer retail (=discounted) price in Micros |
| 154 | "currencyCode": "A String", |
| 155 | "amountInMicros": 3.14, |
| 156 | }, |
| 157 | "listPrice": { # Offer list (=undiscounted) price in Micros. |
| 158 | "currencyCode": "A String", |
| 159 | "amountInMicros": 3.14, |
| 160 | }, |
| 161 | "finskyOfferType": 42, # The finsky offer type (e.g., PURCHASE=0 RENTAL=3) |
| 162 | }, |
| 163 | ], |
| 164 | "saleability": "A String", # Whether or not this book is available for sale or offered for free in the Google eBookstore for the country listed above. Possible values are FOR_SALE, FOR_RENTAL_ONLY, FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER. |
| 165 | "buyLink": "A String", # URL to purchase this volume on the Google Books site. (In LITE projection) |
| 166 | "onSaleDate": "A String", # The date on which this book is available for sale. |
| 167 | "listPrice": { # Suggested retail price. (In LITE projection.) |
| 168 | "amount": 3.14, # Amount in the currency listed below. (In LITE projection.) |
| 169 | "currencyCode": "A String", # An ISO 4217, three-letter currency code. (In LITE projection.) |
| 170 | }, |
| 171 | }, |
| 172 | "etag": "A String", # Opaque identifier for a specific version of a volume resource. (In LITE projection) |
| 173 | "selfLink": "A String", # URL to this resource. (In LITE projection.) |
| 174 | "volumeInfo": { # General volume information. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 175 | "subtitle": "A String", # Volume subtitle. (In LITE projection.) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 176 | "pageCount": 42, # Total number of pages as per publisher metadata. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 177 | "mainCategory": "A String", # The main category to which this volume belongs. It will be the category from the categories list returned below that has the highest weight. |
| 178 | "dimensions": { # Physical dimensions of this volume. |
| 179 | "width": "A String", # Width of this volume (in cm). |
| 180 | "thickness": "A String", # Thickness of this volume (in cm). |
| 181 | "height": "A String", # Height or length of this volume (in cm). |
| 182 | }, |
| 183 | "previewLink": "A String", # URL to preview this volume on the Google Books site. |
| 184 | "contentVersion": "A String", # An identifier for the version of the volume content (text & images). (In LITE projection) |
| 185 | "industryIdentifiers": [ # Industry standard identifiers for this volume. |
| 186 | { |
| 187 | "identifier": "A String", # Industry specific volume identifier. |
| 188 | "type": "A String", # Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER. |
| 189 | }, |
| 190 | ], |
| 191 | "canonicalVolumeLink": "A String", # Canonical URL for a volume. (In LITE projection.) |
| 192 | "description": "A String", # A synopsis of the volume. The text of the description is formatted in HTML and includes simple formatting elements, such as b, i, and br tags. (In LITE projection.) |
| 193 | "publishedDate": "A String", # Date of publication. (In LITE projection.) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 194 | "imageLinks": { # A list of image links for all the sizes that are available. (In LITE projection.) |
| 195 | "medium": "A String", # Image link for medium size (width of ~575 pixels). (In LITE projection) |
| 196 | "smallThumbnail": "A String", # Image link for small thumbnail size (width of ~80 pixels). (In LITE projection) |
| 197 | "large": "A String", # Image link for large size (width of ~800 pixels). (In LITE projection) |
| 198 | "extraLarge": "A String", # Image link for extra large size (width of ~1280 pixels). (In LITE projection) |
| 199 | "small": "A String", # Image link for small size (width of ~300 pixels). (In LITE projection) |
| 200 | "thumbnail": "A String", # Image link for thumbnail size (width of ~128 pixels). (In LITE projection) |
| 201 | }, |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 202 | "authors": [ # The names of the authors and/or editors for this volume. (In LITE projection) |
| 203 | "A String", |
| 204 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 205 | "categories": [ # A list of subject categories, such as "Fiction", "Suspense", etc. |
| 206 | "A String", |
| 207 | ], |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 208 | "publisher": "A String", # Publisher of this volume. (In LITE projection.) |
| 209 | "language": "A String", # Best language for this volume (based on content). It is the two-letter ISO 639-1 code such as 'fr', 'en', etc. |
| 210 | "readingModes": "", # The reading modes available for this volume. |
| 211 | "title": "A String", # Volume title. (In LITE projection.) |
| 212 | "printType": "A String", # Type of publication of this volume. Possible values are BOOK or MAGAZINE. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame^] | 213 | "samplePageCount": 42, # Total number of sample pages as per publisher metadata. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 214 | "printedPageCount": 42, # Total number of printed pages in generated pdf representation. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 215 | "averageRating": 3.14, # The mean review rating for this volume. (min = 1.0, max = 5.0) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 216 | "infoLink": "A String", # URL to view information about this volume on the Google Books site. (In LITE projection) |
| 217 | "ratingsCount": 42, # The number of review ratings for this volume. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 218 | }, |
| 219 | "recommendedInfo": { # Recommendation related information for this volume. |
| 220 | "explanation": "A String", # A text explaining why this volume is recommended. |
| 221 | }, |
| 222 | "id": "A String", # Unique identifier for a volume. (In LITE projection.) |
| 223 | "layerInfo": { # What layers exist in this volume and high level information about them. |
| 224 | "layers": [ # A layer should appear here if and only if the layer exists for this book. |
| 225 | { |
| 226 | "volumeAnnotationsVersion": "A String", # The current version of this layer's volume annotations. Note that this version applies only to the data in the books.layers.volumeAnnotations.* responses. The actual annotation data is versioned separately. |
| 227 | "layerId": "A String", # The layer id of this layer (e.g. "geo"). |
| 228 | }, |
| 229 | ], |
| 230 | }, |
| 231 | "userInfo": { # User specific information related to this volume. (e.g. page this user last read or whether they purchased this book) |
| 232 | "isInMyBooks": True or False, # Whether or not this volume is currently in "my books." |
| 233 | "rentalPeriod": { # Period during this book is/was a valid rental. |
| 234 | "startUtcSec": "A String", |
| 235 | "endUtcSec": "A String", |
| 236 | }, |
| 237 | "updated": "A String", # Timestamp when this volume was last modified by a user action, such as a reading position update, volume purchase or writing a review. (RFC 3339 UTC date-time format). |
| 238 | "userUploadedVolumeInfo": { |
| 239 | "processingState": "A String", |
| 240 | }, |
| 241 | "rentalState": "A String", # Whether this book is an active or an expired rental. |
| 242 | "isPurchased": True or False, # Whether or not this volume was purchased by the authenticated user making the request. (In LITE projection.) |
| 243 | "readingPosition": { # The user's current reading position in the volume, if one is available. (In LITE projection.) |
| 244 | "kind": "books#readingPosition", # Resource type for a reading position. |
| 245 | "gbImagePosition": "A String", # Position in a volume for image-based content. |
| 246 | "epubCfiPosition": "A String", # Position in an EPUB as a CFI. |
| 247 | "updated": "A String", # Timestamp when this reading position was last updated (formatted UTC timestamp with millisecond resolution). |
| 248 | "volumeId": "A String", # Volume id associated with this reading position. |
| 249 | "pdfPosition": "A String", # Position in a PDF file. |
| 250 | "gbTextPosition": "A String", # Position in a volume for text-based content. |
| 251 | }, |
| 252 | "review": { # This user's review of this volume, if one exists. |
| 253 | "rating": "A String", # Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED. |
| 254 | "kind": "books#review", # Resource type for a review. |
| 255 | "author": { # Author of this review. |
| 256 | "displayName": "A String", # Name of this person. |
| 257 | }, |
| 258 | "title": "A String", # Title for this review. |
| 259 | "volumeId": "A String", # Volume that this review is for. |
| 260 | "content": "A String", # Review text. |
| 261 | "source": { # Information regarding the source of this review, when the review is not from a Google Books user. |
| 262 | "extraDescription": "A String", # Extra text about the source of the review. |
| 263 | "url": "A String", # URL of the source of the review. |
| 264 | "description": "A String", # Name of the source. |
| 265 | }, |
| 266 | "date": "A String", # Date of this review. |
| 267 | "type": "A String", # Source type for this review. Possible values are EDITORIAL, WEB_USER or GOOGLE_USER. |
| 268 | "fullTextUrl": "A String", # URL for the full review text, for reviews gathered from the web. |
| 269 | }, |
| 270 | "isPreordered": True or False, # Whether or not this volume was pre-ordered by the authenticated user making the request. (In LITE projection.) |
| 271 | "copy": { # Copy/Paste accounting information. |
| 272 | "limitType": "A String", |
| 273 | "remainingCharacterCount": 42, |
| 274 | "updated": "A String", |
| 275 | "allowedCharacterCount": 42, |
| 276 | }, |
| 277 | "isUploaded": True or False, # Whether or not this volume was user uploaded. |
| 278 | }, |
| 279 | }, |
| 280 | ], |
| 281 | "kind": "books#volumes", # Resource type. |
| 282 | }</pre> |
| 283 | </div> |
| 284 | |
| 285 | <div class="method"> |
| 286 | <code class="details" id="rate">rate(rating, volumeId, source=None, locale=None)</code> |
| 287 | <pre>Rate a recommended book for the current user. |
| 288 | |
| 289 | Args: |
| 290 | rating: string, Rating to be given to the volume. (required) |
| 291 | Allowed values |
| 292 | HAVE_IT - Rating indicating a dismissal due to ownership. |
| 293 | NOT_INTERESTED - Rating indicating a negative dismissal of a volume. |
| 294 | volumeId: string, ID of the source volume. (required) |
| 295 | source: string, String to identify the originator of this request. |
| 296 | locale: string, ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. |
| 297 | |
| 298 | Returns: |
| 299 | An object of the form: |
| 300 | |
| 301 | { |
| 302 | "consistency_token": "A String", |
| 303 | }</pre> |
| 304 | </div> |
| 305 | |
| 306 | </body></html> |