Joe Gregorio | b9e63ff | 2011-06-30 12:38:10 -0400 | [diff] [blame] | 1 | |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 | <html><head><title>Python: class Resource</title> |
| 4 | </head><body bgcolor="#f0f0f8"> |
| 5 | <p> |
| 6 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 7 | <tr bgcolor="#ffc8d8"> |
| 8 | <td colspan=3 valign=bottom> <br> |
| 9 | <font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| 10 | |
| 11 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 12 | <td colspan=2><tt>A class for interacting with a resource.<br> </tt></td></tr> |
| 13 | <tr><td> </td> |
| 14 | <td width="100%">Methods defined here:<br> |
| 15 | <dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl> |
| 16 | |
| 17 | <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Gets volume information for volumes on a bookshelf.<br> |
| 18 | <br> |
| 19 | Args:<br> |
| 20 | projection: string, Restrict information returned to a set of selected fields.<br> |
| 21 | Allowed values<br> |
| 22 | full - Includes all volume data.<br> |
| 23 | lite - Includes a subset of fields in volumeInfo and accessInfo.<br> |
| 24 | source: string, String to identify the originator of this request.<br> |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 25 | country: string, ISO-3166-1 code to override the IP-based location.<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame^] | 26 | showPreorders: boolean, Set to true to show pre-ordered books. Defaults to false.<br> |
Joe Gregorio | b9e63ff | 2011-06-30 12:38:10 -0400 | [diff] [blame] | 27 | maxResults: integer, Maximum number of results to return<br> |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 28 | q: string, Full-text search query string in this bookshelf.<br> |
| 29 | startIndex: integer, Index of the first element to return (starts at 0)<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame^] | 30 | shelf: string, The bookshelf id or name retrieve volumes for.<br> |
| 31 | <br> |
| 32 | Returns:<br> |
| 33 | An object of the form<br> |
| 34 | <br> |
| 35 | {<br> |
| 36 | "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.<br> |
| 37 | "items": [ # A list of volumes.<br> |
| 38 | {<br> |
| 39 | "kind": "books#volume", # Resource type for a volume. (In LITE projection.)<br> |
| 40 | "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.).<br> |
| 41 | "publicDomain": True or False, # Whether or not this book is public domain in the country listed above.<br> |
| 42 | "embeddable": True or False, # Whether this volume can be embedded in a viewport using the Embedded Viewer API.<br> |
| 43 | "downloadAccess": { # Information about a volume's download license access restrictions.<br> |
| 44 | "nonce": "A String", # Client nonce for verification. Download access and client-validation only.<br> |
| 45 | "kind": "books#downloadAccessRestriction", # Resource type.<br> |
| 46 | "justAcquired": True or False, # If deviceAllowed, whether access was just acquired with this request.<br> |
| 47 | "maxDownloadDevices": 42, # If restricted, the maximum number of content download licenses for this volume.<br> |
| 48 | "downloadsAcquired": 42, # If restricted, the number of content download licenses already acquired (including the requesting client, if licensed).<br> |
| 49 | "signature": "A String", # Response signature.<br> |
| 50 | "volumeId": "A String", # Identifies the volume for which this entry applies.<br> |
| 51 | "deviceAllowed": True or False, # If restricted, whether access is granted for this (user, device, volume).<br> |
| 52 | "source": "A String", # Client app identifier for verification. Download access and client-validation only.<br> |
| 53 | "restricted": True or False, # Whether this volume has any download access restrictions.<br> |
| 54 | "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<br> |
| 55 | "message": "A String", # Error/warning message.<br> |
| 56 | },<br> |
| 57 | "country": "A String", # The two-letter ISO_3166-1 country code for which this access information is valid. (In LITE projection.)<br> |
| 58 | "textToSpeechPermission": "A String", # Whether text-to-speech is permitted for this volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED.<br> |
| 59 | "pdf": { # Information about pdf content. (In LITE projection.)<br> |
| 60 | "downloadLink": "A String", # URL to download pdf. (In LITE projection.)<br> |
| 61 | "acsTokenLink": "A String", # URL to retrieve ACS token for pdf download. (In LITE projection.)<br> |
| 62 | },<br> |
| 63 | "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.<br> |
| 64 | "epub": { # Information about epub content. (In LITE projection.)<br> |
| 65 | "downloadLink": "A String", # URL to download epub. (In LITE projection.)<br> |
| 66 | "acsTokenLink": "A String", # URL to retrieve ACS token for epub download. (In LITE projection.)<br> |
| 67 | },<br> |
| 68 | "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.)<br> |
| 69 | },<br> |
| 70 | "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).<br> |
| 71 | "country": "A String", # The two-letter ISO_3166-1 country code for which this sale information is valid. (In LITE projection.)<br> |
| 72 | "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.)<br> |
| 73 | "amount": 3.140000, # Amount in the currency listed below. (In LITE projection.)<br> |
| 74 | "currencyCode": "A String", # An ISO 4217, three-letter currency code. (In LITE projection.)<br> |
| 75 | },<br> |
| 76 | "isEbook": True or False, # Whether or not this volume is an eBook (can be added to the My eBooks shelf).<br> |
| 77 | "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.<br> |
| 78 | "buyLink": "A String", # URL to purchase this volume on the Google Books site. (In LITE projection)<br> |
| 79 | "onSaleDate": "A String", # The date on which this book is available for sale.<br> |
| 80 | "listPrice": { # Suggested retail price. (In LITE projection.)<br> |
| 81 | "amount": 3.140000, # Amount in the currency listed below. (In LITE projection.)<br> |
| 82 | "currencyCode": "A String", # An ISO 4217, three-letter currency code. (In LITE projection.)<br> |
| 83 | },<br> |
| 84 | },<br> |
| 85 | "etag": "A String", # Opaque identifier for a specific version of a volume resource. (In LITE projection)<br> |
| 86 | "userInfo": { # User specific information related to this volume. (e.g. page this user last read or whether they purchased this book)<br> |
| 87 | "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. (<a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> UTC date-time format).<br> |
| 88 | "isPreordered": True or False, # Whether or not this volume was pre-ordered by the authenticated user making the request. (In LITE projection.)<br> |
| 89 | "isPurchased": True or False, # Whether or not this volume was purchased by the authenticated user making the request. (In LITE projection.)<br> |
| 90 | "readingPosition": { # The user's current reading position in the volume, if one is available. (In LITE projection.)<br> |
| 91 | "kind": "books#readingPosition", # Resource type for a reading position.<br> |
| 92 | "gbImagePosition": "A String", # Position in a volume for image-based content.<br> |
| 93 | "epubCfiPosition": "A String", # Position in an EPUB as a CFI.<br> |
| 94 | "updated": "A String", # Timestamp when this reading position was last updated (formatted UTC timestamp with millisecond resolution).<br> |
| 95 | "volumeId": "A String", # Volume id associated with this reading position.<br> |
| 96 | "pdfPosition": "A String", # Position in a PDF file.<br> |
| 97 | "gbTextPosition": "A String", # Position in a volume for text-based content.<br> |
| 98 | },<br> |
| 99 | "review": { # This user's review of this volume, if one exists.<br> |
| 100 | "rating": "A String", # Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED.<br> |
| 101 | "kind": "books#review", # Resource type for a review.<br> |
| 102 | "author": { # Author of this review.<br> |
| 103 | "displayName": "A String", # Name of this person.<br> |
| 104 | },<br> |
| 105 | "title": "A String", # Title for this review.<br> |
| 106 | "volumeId": "A String", # Volume that this review is for.<br> |
| 107 | "content": "A String", # Review text.<br> |
| 108 | "source": { # Information regarding the source of this review, when the review is not from a Google Books user.<br> |
| 109 | "extraDescription": "A String", # Extra text about the source of the review.<br> |
| 110 | "url": "A String", # URL of the source of the review.<br> |
| 111 | "description": "A String", # Name of the source.<br> |
| 112 | },<br> |
| 113 | "date": "A String", # Date of this review.<br> |
| 114 | "type": "A String", # Source type for this review. Possible values are EDITORIAL, WEB_USER or GOOGLE_USER.<br> |
| 115 | "fullTextUrl": "A String", # URL for the full review text, for reviews gathered from the web.<br> |
| 116 | },<br> |
| 117 | },<br> |
| 118 | "volumeInfo": { # General volume information.<br> |
| 119 | "publisher": "A String", # Publisher of this volume. (In LITE projection.)<br> |
| 120 | "subtitle": "A String", # Volume subtitle. (In LITE projection.)<br> |
| 121 | "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.)<br> |
| 122 | "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.<br> |
| 123 | "pageCount": 42, # Total number of pages.<br> |
| 124 | "imageLinks": { # A list of image links for all the sizes that are available. (In LITE projection.)<br> |
| 125 | "medium": "A String", # Image link for medium size (width of ~575 pixels). (In LITE projection)<br> |
| 126 | "smallThumbnail": "A String", # Image link for small thumbnail size (width of ~80 pixels). (In LITE projection)<br> |
| 127 | "large": "A String", # Image link for large size (width of ~800 pixels). (In LITE projection)<br> |
| 128 | "extraLarge": "A String", # Image link for extra large size (width of ~1280 pixels). (In LITE projection)<br> |
| 129 | "small": "A String", # Image link for small size (width of ~300 pixels). (In LITE projection)<br> |
| 130 | "thumbnail": "A String", # Image link for thumbnail size (width of ~128 pixels). (In LITE projection)<br> |
| 131 | },<br> |
| 132 | "publishedDate": "A String", # Date of publication. (In LITE projection.)<br> |
| 133 | "previewLink": "A String", # URL to preview this volume on the Google Books site.<br> |
| 134 | "printType": "A String", # Type of publication of this volume. Possible values are BOOK or MAGAZINE.<br> |
| 135 | "ratingsCount": 42, # The number of review ratings for this volume.<br> |
| 136 | "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.<br> |
| 137 | "dimensions": { # Physical dimensions of this volume.<br> |
| 138 | "width": "A String", # Width of this volume (in cm).<br> |
| 139 | "thickness": "A String", # Thickness of this volume (in cm).<br> |
| 140 | "height": "A String", # Height or length of this volume (in cm).<br> |
| 141 | },<br> |
| 142 | "contentVersion": "A String", # An identifier for the version of the volume content (text & images). (In LITE projection)<br> |
| 143 | "industryIdentifiers": [ # Industry standard identifiers for this volume.<br> |
| 144 | {<br> |
| 145 | "identifier": "A String", # Industry specific volume identifier.<br> |
| 146 | "type": "A String", # Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER.<br> |
| 147 | },<br> |
| 148 | ],<br> |
| 149 | "authors": [ # The names of the authors and/or editors for this volume. (In LITE projection)<br> |
| 150 | "A String",<br> |
| 151 | ],<br> |
| 152 | "title": "A String", # Volume title. (In LITE projection.)<br> |
| 153 | "canonicalVolumeLink": "A String", # Canonical URL for a volume. Use this URL to plus one a Google Book. (In LITE projection)<br> |
| 154 | "infoLink": "A String", # URL to view information about this volume on the Google Books site. (In LITE projection)<br> |
| 155 | "categories": [ # A list of subject categories, such as "Fiction", "Suspense", etc.<br> |
| 156 | "A String",<br> |
| 157 | ],<br> |
| 158 | "averageRating": 3.140000, # The mean review rating for this volume. (min = 1.0, max = 5.0)<br> |
| 159 | },<br> |
| 160 | "id": "A String", # Unique identifier for a volume. (In LITE projection.)<br> |
| 161 | "selfLink": "A String", # URL to this resource. (In LITE projection.)<br> |
| 162 | },<br> |
| 163 | ],<br> |
| 164 | "kind": "books#volumes", # Resource type.<br> |
| 165 | }</tt></dd></dl> |
Joe Gregorio | b9e63ff | 2011-06-30 12:38:10 -0400 | [diff] [blame] | 166 | |
| 167 | <hr> |
| 168 | Data descriptors defined here:<br> |
| 169 | <dl><dt><strong>__dict__</strong></dt> |
| 170 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 171 | </dl> |
| 172 | <dl><dt><strong>__weakref__</strong></dt> |
| 173 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 174 | </dl> |
| 175 | </td></tr></table> |
| 176 | </body></html> |