265 lines
40 KiB
HTML
265 lines
40 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: class Resource</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<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>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A class for interacting with a resource.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Resource-releaseDownloadAccess"><strong>releaseDownloadAccess</strong></a> = method(self, **kwargs)</dt><dd><tt>Release downloaded content access restriction.<br>
|
|
<br>
|
|
Args:<br>
|
|
pp: string, A parameter<br>
|
|
trace: string, A parameter<br>
|
|
source: string, String to identify the originator of this request.<br>
|
|
locale: string, ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.<br>
|
|
cpksver: string, The device/version ID from which to release the restriction. (required)<br>
|
|
strict: string, A parameter<br>
|
|
volumeIds: string, The volume(s) to release restrictions for. (required) (repeated)<br>
|
|
userip: string, A parameter<br>
|
|
<br>
|
|
Returns:<br>
|
|
An object of the form<br>
|
|
<br>
|
|
{<br>
|
|
"downloadAccessList": [ # A list of download access responses.<br>
|
|
{<br>
|
|
"nonce": "A String", # Client nonce for verification. Download access and client-validation only.<br>
|
|
"kind": "books#downloadAccessRestriction", # Resource type.<br>
|
|
"justAcquired": True or False, # If deviceAllowed, whether access was just acquired with this request.<br>
|
|
"maxDownloadDevices": 42, # If restricted, the maximum number of content download licenses for this volume.<br>
|
|
"downloadsAcquired": 42, # If restricted, the number of content download licenses already acquired (including the requesting client, if licensed).<br>
|
|
"signature": "A String", # Response signature.<br>
|
|
"volumeId": "A String", # Identifies the volume for which this entry applies.<br>
|
|
"deviceAllowed": True or False, # If restricted, whether access is granted for this (user, device, volume).<br>
|
|
"source": "A String", # Client app identifier for verification. Download access and client-validation only.<br>
|
|
"restricted": True or False, # Whether this volume has any download access restrictions.<br>
|
|
"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>
|
|
"message": "A String", # Error/warning message.<br>
|
|
},<br>
|
|
],<br>
|
|
"kind": "books#downloadAccesses", # Resource type.<br>
|
|
}</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Resource-requestAccess"><strong>requestAccess</strong></a> = method(self, **kwargs)</dt><dd><tt>Request concurrent and download access restrictions.<br>
|
|
<br>
|
|
Args:<br>
|
|
nonce: string, The client nonce value. (required)<br>
|
|
pp: string, A parameter<br>
|
|
trace: string, A parameter<br>
|
|
source: string, String to identify the originator of this request. (required)<br>
|
|
locale: string, ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.<br>
|
|
cpksver: string, The device/version ID from which to request the restrictions. (required)<br>
|
|
volumeId: string, The volume to request concurrent/download restrictions for. (required)<br>
|
|
strict: string, A parameter<br>
|
|
userip: string, A parameter<br>
|
|
<br>
|
|
Returns:<br>
|
|
An object of the form<br>
|
|
<br>
|
|
{<br>
|
|
"downloadAccess": { # A download access response.<br>
|
|
"nonce": "A String", # Client nonce for verification. Download access and client-validation only.<br>
|
|
"kind": "books#downloadAccessRestriction", # Resource type.<br>
|
|
"justAcquired": True or False, # If deviceAllowed, whether access was just acquired with this request.<br>
|
|
"maxDownloadDevices": 42, # If restricted, the maximum number of content download licenses for this volume.<br>
|
|
"downloadsAcquired": 42, # If restricted, the number of content download licenses already acquired (including the requesting client, if licensed).<br>
|
|
"signature": "A String", # Response signature.<br>
|
|
"volumeId": "A String", # Identifies the volume for which this entry applies.<br>
|
|
"deviceAllowed": True or False, # If restricted, whether access is granted for this (user, device, volume).<br>
|
|
"source": "A String", # Client app identifier for verification. Download access and client-validation only.<br>
|
|
"restricted": True or False, # Whether this volume has any download access restrictions.<br>
|
|
"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>
|
|
"message": "A String", # Error/warning message.<br>
|
|
},<br>
|
|
"kind": "books#requestAccess", # Resource type.<br>
|
|
"concurrentAccess": { # A concurrent access response.<br>
|
|
"nonce": "A String", # Client nonce for verification. Download access and client-validation only.<br>
|
|
"kind": "books#concurrentAccessRestriction", # Resource type.<br>
|
|
"restricted": True or False, # Whether this volume has any concurrent access restrictions.<br>
|
|
"volumeId": "A String", # Identifies the volume for which this entry applies.<br>
|
|
"maxConcurrentDevices": 42, # The maximum number of concurrent access licenses for this volume.<br>
|
|
"deviceAllowed": True or False, # Whether access is granted for this (user, device, volume).<br>
|
|
"source": "A String", # Client app identifier for verification. Download access and client-validation only.<br>
|
|
"timeWindowSeconds": 42, # Time in seconds for license auto-expiration.<br>
|
|
"signature": "A String", # Response signature.<br>
|
|
"reasonCode": "A String", # Error/warning reason code.<br>
|
|
"message": "A String", # Error/warning message.<br>
|
|
},<br>
|
|
}</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Resource-syncVolumeLicenses"><strong>syncVolumeLicenses</strong></a> = method(self, **kwargs)</dt><dd><tt>Request downloaded content access for specified volumes on the My eBooks shelf.<br>
|
|
<br>
|
|
Args:<br>
|
|
nonce: string, The client nonce value. (required)<br>
|
|
pp: string, A parameter<br>
|
|
trace: string, A parameter<br>
|
|
source: string, String to identify the originator of this request. (required)<br>
|
|
locale: string, ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.<br>
|
|
showPreorders: boolean, Set to true to show pre-ordered books. Defaults to false.<br>
|
|
cpksver: string, The device/version ID from which to release the restriction. (required)<br>
|
|
strict: string, A parameter<br>
|
|
volumeIds: string, The volume(s) to request download restrictions for. (repeated)<br>
|
|
userip: string, A parameter<br>
|
|
<br>
|
|
Returns:<br>
|
|
An object of the form<br>
|
|
<br>
|
|
{<br>
|
|
"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>
|
|
"items": [ # A list of volumes.<br>
|
|
{<br>
|
|
"kind": "books#volume", # Resource type for a volume. (In LITE projection.)<br>
|
|
"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>
|
|
"webReaderLink": "A String", # URL to read this volume on the Google Books site. Link will not allow users to read non-viewable volumes.<br>
|
|
"publicDomain": True or False, # Whether or not this book is public domain in the country listed above.<br>
|
|
"embeddable": True or False, # Whether this volume can be embedded in a viewport using the Embedded Viewer API.<br>
|
|
"downloadAccess": { # Information about a volume's download license access restrictions.<br>
|
|
"nonce": "A String", # Client nonce for verification. Download access and client-validation only.<br>
|
|
"kind": "books#downloadAccessRestriction", # Resource type.<br>
|
|
"justAcquired": True or False, # If deviceAllowed, whether access was just acquired with this request.<br>
|
|
"maxDownloadDevices": 42, # If restricted, the maximum number of content download licenses for this volume.<br>
|
|
"downloadsAcquired": 42, # If restricted, the number of content download licenses already acquired (including the requesting client, if licensed).<br>
|
|
"signature": "A String", # Response signature.<br>
|
|
"volumeId": "A String", # Identifies the volume for which this entry applies.<br>
|
|
"deviceAllowed": True or False, # If restricted, whether access is granted for this (user, device, volume).<br>
|
|
"source": "A String", # Client app identifier for verification. Download access and client-validation only.<br>
|
|
"restricted": True or False, # Whether this volume has any download access restrictions.<br>
|
|
"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>
|
|
"message": "A String", # Error/warning message.<br>
|
|
},<br>
|
|
"country": "A String", # The two-letter ISO_3166-1 country code for which this access information is valid. (In LITE projection.)<br>
|
|
"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.<br>
|
|
"textToSpeechPermission": "A String", # Whether text-to-speech is permitted for this volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED.<br>
|
|
"pdf": { # Information about pdf content. (In LITE projection.)<br>
|
|
"isAvailable": True or False, # Is a scanned image pdf available either as public domain or for purchase. (In LITE projection.)<br>
|
|
"downloadLink": "A String", # URL to download pdf. (In LITE projection.)<br>
|
|
"acsTokenLink": "A String", # URL to retrieve ACS token for pdf download. (In LITE projection.)<br>
|
|
},<br>
|
|
"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>
|
|
"epub": { # Information about epub content. (In LITE projection.)<br>
|
|
"isAvailable": True or False, # Is a flowing text epub available either as public domain or for purchase. (In LITE projection.)<br>
|
|
"downloadLink": "A String", # URL to download epub. (In LITE projection.)<br>
|
|
"acsTokenLink": "A String", # URL to retrieve ACS token for epub download. (In LITE projection.)<br>
|
|
},<br>
|
|
"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>
|
|
},<br>
|
|
"searchInfo": { # Search result information related to this volume.<br>
|
|
"textSnippet": "A String", # A text snippet containing the search query.<br>
|
|
},<br>
|
|
"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>
|
|
"country": "A String", # The two-letter ISO_3166-1 country code for which this sale information is valid. (In LITE projection.)<br>
|
|
"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>
|
|
"amount": 3.14, # Amount in the currency listed below. (In LITE projection.)<br>
|
|
"currencyCode": "A String", # An ISO 4217, three-letter currency code. (In LITE projection.)<br>
|
|
},<br>
|
|
"isEbook": True or False, # Whether or not this volume is an eBook (can be added to the My eBooks shelf).<br>
|
|
"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>
|
|
"buyLink": "A String", # URL to purchase this volume on the Google Books site. (In LITE projection)<br>
|
|
"onSaleDate": "A String", # The date on which this book is available for sale.<br>
|
|
"listPrice": { # Suggested retail price. (In LITE projection.)<br>
|
|
"amount": 3.14, # Amount in the currency listed below. (In LITE projection.)<br>
|
|
"currencyCode": "A String", # An ISO 4217, three-letter currency code. (In LITE projection.)<br>
|
|
},<br>
|
|
},<br>
|
|
"etag": "A String", # Opaque identifier for a specific version of a volume resource. (In LITE projection)<br>
|
|
"userInfo": { # User specific information related to this volume. (e.g. page this user last read or whether they purchased this book)<br>
|
|
"isInMyBooks": True or False, # Whether or not this volume is currently in "my books."<br>
|
|
"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>
|
|
"review": { # This user's review of this volume, if one exists.<br>
|
|
"rating": "A String", # Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED.<br>
|
|
"kind": "books#review", # Resource type for a review.<br>
|
|
"author": { # Author of this review.<br>
|
|
"displayName": "A String", # Name of this person.<br>
|
|
},<br>
|
|
"title": "A String", # Title for this review.<br>
|
|
"volumeId": "A String", # Volume that this review is for.<br>
|
|
"content": "A String", # Review text.<br>
|
|
"source": { # Information regarding the source of this review, when the review is not from a Google Books user.<br>
|
|
"extraDescription": "A String", # Extra text about the source of the review.<br>
|
|
"url": "A String", # URL of the source of the review.<br>
|
|
"description": "A String", # Name of the source.<br>
|
|
},<br>
|
|
"date": "A String", # Date of this review.<br>
|
|
"type": "A String", # Source type for this review. Possible values are EDITORIAL, WEB_USER or GOOGLE_USER.<br>
|
|
"fullTextUrl": "A String", # URL for the full review text, for reviews gathered from the web.<br>
|
|
},<br>
|
|
"isPurchased": True or False, # Whether or not this volume was purchased by the authenticated user making the request. (In LITE projection.)<br>
|
|
"readingPosition": { # The user's current reading position in the volume, if one is available. (In LITE projection.)<br>
|
|
"kind": "books#readingPosition", # Resource type for a reading position.<br>
|
|
"gbImagePosition": "A String", # Position in a volume for image-based content.<br>
|
|
"epubCfiPosition": "A String", # Position in an EPUB as a CFI.<br>
|
|
"updated": "A String", # Timestamp when this reading position was last updated (formatted UTC timestamp with millisecond resolution).<br>
|
|
"volumeId": "A String", # Volume id associated with this reading position.<br>
|
|
"pdfPosition": "A String", # Position in a PDF file.<br>
|
|
"gbTextPosition": "A String", # Position in a volume for text-based content.<br>
|
|
},<br>
|
|
"isPreordered": True or False, # Whether or not this volume was pre-ordered by the authenticated user making the request. (In LITE projection.)<br>
|
|
},<br>
|
|
"volumeInfo": { # General volume information.<br>
|
|
"publisher": "A String", # Publisher of this volume. (In LITE projection.)<br>
|
|
"subtitle": "A String", # Volume subtitle. (In LITE projection.)<br>
|
|
"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>
|
|
"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>
|
|
"pageCount": 42, # Total number of pages.<br>
|
|
"imageLinks": { # A list of image links for all the sizes that are available. (In LITE projection.)<br>
|
|
"medium": "A String", # Image link for medium size (width of ~575 pixels). (In LITE projection)<br>
|
|
"smallThumbnail": "A String", # Image link for small thumbnail size (width of ~80 pixels). (In LITE projection)<br>
|
|
"large": "A String", # Image link for large size (width of ~800 pixels). (In LITE projection)<br>
|
|
"extraLarge": "A String", # Image link for extra large size (width of ~1280 pixels). (In LITE projection)<br>
|
|
"small": "A String", # Image link for small size (width of ~300 pixels). (In LITE projection)<br>
|
|
"thumbnail": "A String", # Image link for thumbnail size (width of ~128 pixels). (In LITE projection)<br>
|
|
},<br>
|
|
"publishedDate": "A String", # Date of publication. (In LITE projection.)<br>
|
|
"previewLink": "A String", # URL to preview this volume on the Google Books site.<br>
|
|
"printType": "A String", # Type of publication of this volume. Possible values are BOOK or MAGAZINE.<br>
|
|
"ratingsCount": 42, # The number of review ratings for this volume.<br>
|
|
"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>
|
|
"dimensions": { # Physical dimensions of this volume.<br>
|
|
"width": "A String", # Width of this volume (in cm).<br>
|
|
"thickness": "A String", # Thickness of this volume (in cm).<br>
|
|
"height": "A String", # Height or length of this volume (in cm).<br>
|
|
},<br>
|
|
"contentVersion": "A String", # An identifier for the version of the volume content (text & images). (In LITE projection)<br>
|
|
"industryIdentifiers": [ # Industry standard identifiers for this volume.<br>
|
|
{<br>
|
|
"identifier": "A String", # Industry specific volume identifier.<br>
|
|
"type": "A String", # Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER.<br>
|
|
},<br>
|
|
],<br>
|
|
"authors": [ # The names of the authors and/or editors for this volume. (In LITE projection)<br>
|
|
"A String",<br>
|
|
],<br>
|
|
"title": "A String", # Volume title. (In LITE projection.)<br>
|
|
"canonicalVolumeLink": "A String", # Canonical URL for a volume. (In LITE projection.)<br>
|
|
"infoLink": "A String", # URL to view information about this volume on the Google Books site. (In LITE projection)<br>
|
|
"categories": [ # A list of subject categories, such as "Fiction", "Suspense", etc.<br>
|
|
"A String",<br>
|
|
],<br>
|
|
"averageRating": 3.14, # The mean review rating for this volume. (min = 1.0, max = 5.0)<br>
|
|
},<br>
|
|
"id": "A String", # Unique identifier for a volume. (In LITE projection.)<br>
|
|
"selfLink": "A String", # URL to this resource. (In LITE projection.)<br>
|
|
},<br>
|
|
],<br>
|
|
"kind": "books#volumes", # Resource type.<br>
|
|
}</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table>
|
|
</body></html> |