Joe Gregorio | 075572b | 2012-07-09 16:53:09 -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.myconfig.html">myconfig</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#releaseDownloadAccess">releaseDownloadAccess(volumeIds, cpksver, source=None, locale=None)</a></code></p> |
| 79 | <p class="firstline">Release downloaded content access restriction.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#requestAccess">requestAccess(source, volumeId, nonce, cpksver, locale=None)</a></code></p> |
| 82 | <p class="firstline">Request concurrent and download access restrictions.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#syncVolumeLicenses">syncVolumeLicenses(source, nonce, cpksver, locale=None, showPreorders=None, volumeIds=None)</a></code></p> |
| 85 | <p class="firstline">Request downloaded content access for specified volumes on the My eBooks shelf.</p> |
| 86 | <h3>Method Details</h3> |
| 87 | <div class="method"> |
| 88 | <code class="details" id="releaseDownloadAccess">releaseDownloadAccess(volumeIds, cpksver, source=None, locale=None)</code> |
| 89 | <pre>Release downloaded content access restriction. |
| 90 | |
| 91 | Args: |
| 92 | volumeIds: string, The volume(s) to release restrictions for. (required) (repeated) |
| 93 | cpksver: string, The device/version ID from which to release the restriction. (required) |
| 94 | source: string, String to identify the originator of this request. |
| 95 | locale: string, ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. |
| 96 | |
| 97 | Returns: |
| 98 | An object of the form: |
| 99 | |
| 100 | { |
| 101 | "downloadAccessList": [ # A list of download access responses. |
| 102 | { |
| 103 | "nonce": "A String", # Client nonce for verification. Download access and client-validation only. |
| 104 | "kind": "books#downloadAccessRestriction", # Resource type. |
| 105 | "justAcquired": True or False, # If deviceAllowed, whether access was just acquired with this request. |
| 106 | "maxDownloadDevices": 42, # If restricted, the maximum number of content download licenses for this volume. |
| 107 | "downloadsAcquired": 42, # If restricted, the number of content download licenses already acquired (including the requesting client, if licensed). |
| 108 | "signature": "A String", # Response signature. |
| 109 | "volumeId": "A String", # Identifies the volume for which this entry applies. |
| 110 | "deviceAllowed": True or False, # If restricted, whether access is granted for this (user, device, volume). |
| 111 | "source": "A String", # Client app identifier for verification. Download access and client-validation only. |
| 112 | "restricted": True or False, # Whether this volume has any download access restrictions. |
| 113 | "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 |
| 114 | "message": "A String", # Error/warning message. |
| 115 | }, |
| 116 | ], |
| 117 | "kind": "books#downloadAccesses", # Resource type. |
| 118 | }</pre> |
| 119 | </div> |
| 120 | |
| 121 | <div class="method"> |
| 122 | <code class="details" id="requestAccess">requestAccess(source, volumeId, nonce, cpksver, locale=None)</code> |
| 123 | <pre>Request concurrent and download access restrictions. |
| 124 | |
| 125 | Args: |
| 126 | source: string, String to identify the originator of this request. (required) |
| 127 | volumeId: string, The volume to request concurrent/download restrictions for. (required) |
| 128 | nonce: string, The client nonce value. (required) |
| 129 | cpksver: string, The device/version ID from which to request the restrictions. (required) |
| 130 | locale: string, ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. |
| 131 | |
| 132 | Returns: |
| 133 | An object of the form: |
| 134 | |
| 135 | { |
| 136 | "downloadAccess": { # A download access response. |
| 137 | "nonce": "A String", # Client nonce for verification. Download access and client-validation only. |
| 138 | "kind": "books#downloadAccessRestriction", # Resource type. |
| 139 | "justAcquired": True or False, # If deviceAllowed, whether access was just acquired with this request. |
| 140 | "maxDownloadDevices": 42, # If restricted, the maximum number of content download licenses for this volume. |
| 141 | "downloadsAcquired": 42, # If restricted, the number of content download licenses already acquired (including the requesting client, if licensed). |
| 142 | "signature": "A String", # Response signature. |
| 143 | "volumeId": "A String", # Identifies the volume for which this entry applies. |
| 144 | "deviceAllowed": True or False, # If restricted, whether access is granted for this (user, device, volume). |
| 145 | "source": "A String", # Client app identifier for verification. Download access and client-validation only. |
| 146 | "restricted": True or False, # Whether this volume has any download access restrictions. |
| 147 | "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 |
| 148 | "message": "A String", # Error/warning message. |
| 149 | }, |
| 150 | "kind": "books#requestAccess", # Resource type. |
| 151 | "concurrentAccess": { # A concurrent access response. |
| 152 | "nonce": "A String", # Client nonce for verification. Download access and client-validation only. |
| 153 | "kind": "books#concurrentAccessRestriction", # Resource type. |
| 154 | "restricted": True or False, # Whether this volume has any concurrent access restrictions. |
| 155 | "volumeId": "A String", # Identifies the volume for which this entry applies. |
| 156 | "maxConcurrentDevices": 42, # The maximum number of concurrent access licenses for this volume. |
| 157 | "deviceAllowed": True or False, # Whether access is granted for this (user, device, volume). |
| 158 | "source": "A String", # Client app identifier for verification. Download access and client-validation only. |
| 159 | "timeWindowSeconds": 42, # Time in seconds for license auto-expiration. |
| 160 | "signature": "A String", # Response signature. |
| 161 | "reasonCode": "A String", # Error/warning reason code. |
| 162 | "message": "A String", # Error/warning message. |
| 163 | }, |
| 164 | }</pre> |
| 165 | </div> |
| 166 | |
| 167 | <div class="method"> |
| 168 | <code class="details" id="syncVolumeLicenses">syncVolumeLicenses(source, nonce, cpksver, locale=None, showPreorders=None, volumeIds=None)</code> |
| 169 | <pre>Request downloaded content access for specified volumes on the My eBooks shelf. |
| 170 | |
| 171 | Args: |
| 172 | source: string, String to identify the originator of this request. (required) |
| 173 | nonce: string, The client nonce value. (required) |
| 174 | cpksver: string, The device/version ID from which to release the restriction. (required) |
| 175 | locale: string, ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. |
| 176 | showPreorders: boolean, Set to true to show pre-ordered books. Defaults to false. |
| 177 | volumeIds: string, The volume(s) to request download restrictions for. (repeated) |
| 178 | |
| 179 | Returns: |
| 180 | An object of the form: |
| 181 | |
| 182 | { |
| 183 | "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. |
| 184 | "items": [ # A list of volumes. |
| 185 | { |
| 186 | "kind": "books#volume", # Resource type for a volume. (In LITE projection.) |
| 187 | "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.). |
| 188 | "webReaderLink": "A String", # URL to read this volume on the Google Books site. Link will not allow users to read non-viewable volumes. |
| 189 | "publicDomain": True or False, # Whether or not this book is public domain in the country listed above. |
| 190 | "embeddable": True or False, # Whether this volume can be embedded in a viewport using the Embedded Viewer API. |
| 191 | "downloadAccess": { # Information about a volume's download license access restrictions. |
| 192 | "nonce": "A String", # Client nonce for verification. Download access and client-validation only. |
| 193 | "kind": "books#downloadAccessRestriction", # Resource type. |
| 194 | "justAcquired": True or False, # If deviceAllowed, whether access was just acquired with this request. |
| 195 | "maxDownloadDevices": 42, # If restricted, the maximum number of content download licenses for this volume. |
| 196 | "downloadsAcquired": 42, # If restricted, the number of content download licenses already acquired (including the requesting client, if licensed). |
| 197 | "signature": "A String", # Response signature. |
| 198 | "volumeId": "A String", # Identifies the volume for which this entry applies. |
| 199 | "deviceAllowed": True or False, # If restricted, whether access is granted for this (user, device, volume). |
| 200 | "source": "A String", # Client app identifier for verification. Download access and client-validation only. |
| 201 | "restricted": True or False, # Whether this volume has any download access restrictions. |
| 202 | "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 |
| 203 | "message": "A String", # Error/warning message. |
| 204 | }, |
| 205 | "country": "A String", # The two-letter ISO_3166-1 country code for which this access information is valid. (In LITE projection.) |
| 206 | "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. |
| 207 | "textToSpeechPermission": "A String", # Whether text-to-speech is permitted for this volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED. |
| 208 | "pdf": { # Information about pdf content. (In LITE projection.) |
| 209 | "isAvailable": True or False, # Is a scanned image pdf available either as public domain or for purchase. (In LITE projection.) |
| 210 | "downloadLink": "A String", # URL to download pdf. (In LITE projection.) |
| 211 | "acsTokenLink": "A String", # URL to retrieve ACS token for pdf download. (In LITE projection.) |
| 212 | }, |
| 213 | "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. |
| 214 | "epub": { # Information about epub content. (In LITE projection.) |
| 215 | "isAvailable": True or False, # Is a flowing text epub available either as public domain or for purchase. (In LITE projection.) |
| 216 | "downloadLink": "A String", # URL to download epub. (In LITE projection.) |
| 217 | "acsTokenLink": "A String", # URL to retrieve ACS token for epub download. (In LITE projection.) |
| 218 | }, |
| 219 | "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.) |
| 220 | }, |
| 221 | "searchInfo": { # Search result information related to this volume. |
| 222 | "textSnippet": "A String", # A text snippet containing the search query. |
| 223 | }, |
| 224 | "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). |
| 225 | "country": "A String", # The two-letter ISO_3166-1 country code for which this sale information is valid. (In LITE projection.) |
| 226 | "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.) |
| 227 | "amount": 3.14, # Amount in the currency listed below. (In LITE projection.) |
| 228 | "currencyCode": "A String", # An ISO 4217, three-letter currency code. (In LITE projection.) |
| 229 | }, |
| 230 | "isEbook": True or False, # Whether or not this volume is an eBook (can be added to the My eBooks shelf). |
| 231 | "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, FREE, NOT_FOR_SALE, or FOR_PREORDER. |
| 232 | "buyLink": "A String", # URL to purchase this volume on the Google Books site. (In LITE projection) |
| 233 | "onSaleDate": "A String", # The date on which this book is available for sale. |
| 234 | "listPrice": { # Suggested retail price. (In LITE projection.) |
| 235 | "amount": 3.14, # Amount in the currency listed below. (In LITE projection.) |
| 236 | "currencyCode": "A String", # An ISO 4217, three-letter currency code. (In LITE projection.) |
| 237 | }, |
| 238 | }, |
| 239 | "etag": "A String", # Opaque identifier for a specific version of a volume resource. (In LITE projection) |
| 240 | "userInfo": { # User specific information related to this volume. (e.g. page this user last read or whether they purchased this book) |
| 241 | "isInMyBooks": True or False, # Whether or not this volume is currently in "my books." |
| 242 | "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). |
| 243 | "review": { # This user's review of this volume, if one exists. |
| 244 | "rating": "A String", # Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED. |
| 245 | "kind": "books#review", # Resource type for a review. |
| 246 | "author": { # Author of this review. |
| 247 | "displayName": "A String", # Name of this person. |
| 248 | }, |
| 249 | "title": "A String", # Title for this review. |
| 250 | "volumeId": "A String", # Volume that this review is for. |
| 251 | "content": "A String", # Review text. |
| 252 | "source": { # Information regarding the source of this review, when the review is not from a Google Books user. |
| 253 | "extraDescription": "A String", # Extra text about the source of the review. |
| 254 | "url": "A String", # URL of the source of the review. |
| 255 | "description": "A String", # Name of the source. |
| 256 | }, |
| 257 | "date": "A String", # Date of this review. |
| 258 | "type": "A String", # Source type for this review. Possible values are EDITORIAL, WEB_USER or GOOGLE_USER. |
| 259 | "fullTextUrl": "A String", # URL for the full review text, for reviews gathered from the web. |
| 260 | }, |
| 261 | "isPurchased": True or False, # Whether or not this volume was purchased by the authenticated user making the request. (In LITE projection.) |
| 262 | "readingPosition": { # The user's current reading position in the volume, if one is available. (In LITE projection.) |
| 263 | "kind": "books#readingPosition", # Resource type for a reading position. |
| 264 | "gbImagePosition": "A String", # Position in a volume for image-based content. |
| 265 | "epubCfiPosition": "A String", # Position in an EPUB as a CFI. |
| 266 | "updated": "A String", # Timestamp when this reading position was last updated (formatted UTC timestamp with millisecond resolution). |
| 267 | "volumeId": "A String", # Volume id associated with this reading position. |
| 268 | "pdfPosition": "A String", # Position in a PDF file. |
| 269 | "gbTextPosition": "A String", # Position in a volume for text-based content. |
| 270 | }, |
| 271 | "isPreordered": True or False, # Whether or not this volume was pre-ordered by the authenticated user making the request. (In LITE projection.) |
| 272 | }, |
| 273 | "volumeInfo": { # General volume information. |
| 274 | "publisher": "A String", # Publisher of this volume. (In LITE projection.) |
| 275 | "subtitle": "A String", # Volume subtitle. (In LITE projection.) |
| 276 | "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.) |
| 277 | "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. |
| 278 | "pageCount": 42, # Total number of pages. |
| 279 | "imageLinks": { # A list of image links for all the sizes that are available. (In LITE projection.) |
| 280 | "medium": "A String", # Image link for medium size (width of ~575 pixels). (In LITE projection) |
| 281 | "smallThumbnail": "A String", # Image link for small thumbnail size (width of ~80 pixels). (In LITE projection) |
| 282 | "large": "A String", # Image link for large size (width of ~800 pixels). (In LITE projection) |
| 283 | "extraLarge": "A String", # Image link for extra large size (width of ~1280 pixels). (In LITE projection) |
| 284 | "small": "A String", # Image link for small size (width of ~300 pixels). (In LITE projection) |
| 285 | "thumbnail": "A String", # Image link for thumbnail size (width of ~128 pixels). (In LITE projection) |
| 286 | }, |
| 287 | "publishedDate": "A String", # Date of publication. (In LITE projection.) |
| 288 | "previewLink": "A String", # URL to preview this volume on the Google Books site. |
| 289 | "printType": "A String", # Type of publication of this volume. Possible values are BOOK or MAGAZINE. |
| 290 | "ratingsCount": 42, # The number of review ratings for this volume. |
| 291 | "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. |
| 292 | "dimensions": { # Physical dimensions of this volume. |
| 293 | "width": "A String", # Width of this volume (in cm). |
| 294 | "thickness": "A String", # Thickness of this volume (in cm). |
| 295 | "height": "A String", # Height or length of this volume (in cm). |
| 296 | }, |
| 297 | "contentVersion": "A String", # An identifier for the version of the volume content (text & images). (In LITE projection) |
| 298 | "industryIdentifiers": [ # Industry standard identifiers for this volume. |
| 299 | { |
| 300 | "identifier": "A String", # Industry specific volume identifier. |
| 301 | "type": "A String", # Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER. |
| 302 | }, |
| 303 | ], |
| 304 | "authors": [ # The names of the authors and/or editors for this volume. (In LITE projection) |
| 305 | "A String", |
| 306 | ], |
| 307 | "title": "A String", # Volume title. (In LITE projection.) |
| 308 | "canonicalVolumeLink": "A String", # Canonical URL for a volume. (In LITE projection.) |
| 309 | "infoLink": "A String", # URL to view information about this volume on the Google Books site. (In LITE projection) |
| 310 | "categories": [ # A list of subject categories, such as "Fiction", "Suspense", etc. |
| 311 | "A String", |
| 312 | ], |
| 313 | "averageRating": 3.14, # The mean review rating for this volume. (min = 1.0, max = 5.0) |
| 314 | }, |
| 315 | "id": "A String", # Unique identifier for a volume. (In LITE projection.) |
| 316 | "selfLink": "A String", # URL to this resource. (In LITE projection.) |
| 317 | }, |
| 318 | ], |
| 319 | "kind": "books#volumes", # Resource type. |
| 320 | }</pre> |
| 321 | </div> |
| 322 | |
| 323 | </body></html> |