Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -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-get"><strong>get</strong></a> = method(self, **kwargs)</dt><dd><tt>Gets the annotation data.<br> |
| 18 | <br> |
| 19 | Args:<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 20 | annotationDataId: string, The ID of the annotation data to retrieve. (required)<br> |
| 21 | pp: string, A parameter<br> |
| 22 | trace: string, A parameter<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 23 | source: string, String to identify the originator of this request.<br> |
| 24 | locale: string, The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.<br> |
| 25 | layerId: string, The ID for the layer to get the annotations. (required)<br> |
| 26 | volumeId: string, The volume to retrieve annotations for. (required)<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 27 | strict: string, A parameter<br> |
| 28 | contentVersion: string, The content version for the volume you are trying to retrieve. (required)<br> |
| 29 | h: integer, The requested pixel height for any images. If height is provided width must also be provided.<br> |
| 30 | userip: string, A parameter<br> |
| 31 | w: integer, The requested pixel width for any images. If width is provided height must also be provided.<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 32 | <br> |
| 33 | Returns:<br> |
| 34 | An object of the form<br> |
| 35 | <br> |
| 36 | {<br> |
| 37 | "annotationType": "A String", # The type of annotation this data is for.<br> |
| 38 | "kind": "books#annotationdata", # Resource Type<br> |
| 39 | "updated": "A String", # Timestamp for the last time this data was updated. (<a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> UTC date-time format).<br> |
| 40 | "volumeId": "A String", # The volume id for this data. *<br> |
| 41 | "encoded_data": "A String", # Base64 encoded data for this annotation data.<br> |
| 42 | "layerId": "A String", # The Layer id for this data. *<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 43 | "data": { # JSON encoded data for this annotation data.<br> |
| 44 | "geo": {<br> |
| 45 | "countryCode": "A String", # The country code of the location.<br> |
| 46 | "zoom": 42, # The Zoom level to use for the map. Zoom levels between 0 (the lowest zoom level, in which the entire world can be seen on one map) to 21+ (down to individual buildings). See: https://developers.google.com/maps/documentation/staticmaps/#Zoomlevels<br> |
| 47 | "longitude": 3.14, # The longitude of the location.<br> |
| 48 | "mapType": "A String", # The type of map that should be used for this location. EX: HYBRID, ROADMAP, SATELLITE, TERRAIN<br> |
| 49 | "latitude": 3.14, # The latitude of the location.<br> |
| 50 | "boundary": [ # The boundary of the location as a set of loops containing pairs of latitude, longitude coordinates.<br> |
| 51 | [<br> |
| 52 | {<br> |
| 53 | "latitude": 42,<br> |
| 54 | "longitude": 42,<br> |
| 55 | },<br> |
| 56 | ],<br> |
| 57 | ],<br> |
| 58 | "resolution": "A String", # The resolution of the location. Ex: POI_LEVEL<br> |
| 59 | "viewport": { # The viewport for showing this location. This is a latitude, longitude rectangle.<br> |
| 60 | "lo": {<br> |
| 61 | "latitude": 3.14,<br> |
| 62 | "longitude": 3.14,<br> |
| 63 | },<br> |
| 64 | "hi": {<br> |
| 65 | "latitude": 3.14,<br> |
| 66 | "longitude": 3.14,<br> |
| 67 | },<br> |
| 68 | },<br> |
| 69 | "cachePolicy": "A String", # The cache policy active for this data. EX: UNRESTRICTED, RESTRICTED, NEVER<br> |
| 70 | },<br> |
| 71 | "common": {<br> |
| 72 | "lang": "A String", # The language of the information url and description.<br> |
| 73 | "previewImageUrl": "A String", # The URL for the preview image information.<br> |
| 74 | "snippet": "A String", # The description for this location.<br> |
| 75 | "snippetUrl": "A String", # The URL for information for this location. Ex: wikipedia link.<br> |
| 76 | },<br> |
| 77 | },<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 78 | "id": "A String", # Unique id for this annotation data.<br> |
| 79 | "selfLink": "A String", # URL for this resource. *<br> |
| 80 | }</tt></dd></dl> |
| 81 | |
| 82 | <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Gets the annotation data for a volume and layer.<br> |
| 83 | <br> |
| 84 | Args:<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 85 | locale: string, The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 86 | pp: string, A parameter<br> |
| 87 | trace: string, A parameter<br> |
| 88 | pageToken: string, The value of the nextToken from the previous page.<br> |
| 89 | updatedMin: string, <a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> timestamp to restrict to items updated since this timestamp (inclusive).<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 90 | source: string, String to identify the originator of this request.<br> |
| 91 | contentVersion: string, The content version for the requested volume. (required)<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 92 | layerId: string, The ID for the layer to get the annotation data. (required)<br> |
| 93 | strict: string, A parameter<br> |
| 94 | updatedMax: string, <a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> timestamp to restrict to items updated prior to this timestamp (exclusive).<br> |
| 95 | volumeId: string, The volume to retrieve annotation data for. (required)<br> |
| 96 | maxResults: integer, Maximum number of results to return<br> |
| 97 | annotationDataId: string, The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set. (repeated)<br> |
| 98 | h: integer, The requested pixel height for any images. If height is provided width must also be provided.<br> |
| 99 | w: integer, The requested pixel width for any images. If width is provided height must also be provided.<br> |
| 100 | userip: string, A parameter<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 101 | <br> |
| 102 | Returns:<br> |
| 103 | An object of the form<br> |
| 104 | <br> |
| 105 | {<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 106 | "nextPageToken": "A String", # Token to pass in for pagination for the next page. This will not be present if this request does not have more results.<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 107 | "items": [ # A list of Annotation Data.<br> |
| 108 | {<br> |
| 109 | "annotationType": "A String", # The type of annotation this data is for.<br> |
| 110 | "kind": "books#annotationdata", # Resource Type<br> |
| 111 | "updated": "A String", # Timestamp for the last time this data was updated. (<a href="http://www.rfc-editor.org/rfc/rfc3339.txt">RFC 3339</a> UTC date-time format).<br> |
| 112 | "volumeId": "A String", # The volume id for this data. *<br> |
| 113 | "encoded_data": "A String", # Base64 encoded data for this annotation data.<br> |
| 114 | "layerId": "A String", # The Layer id for this data. *<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 115 | "data": { # JSON encoded data for this annotation data.<br> |
| 116 | "geo": {<br> |
| 117 | "countryCode": "A String", # The country code of the location.<br> |
| 118 | "zoom": 42, # The Zoom level to use for the map. Zoom levels between 0 (the lowest zoom level, in which the entire world can be seen on one map) to 21+ (down to individual buildings). See: https://developers.google.com/maps/documentation/staticmaps/#Zoomlevels<br> |
| 119 | "longitude": 3.14, # The longitude of the location.<br> |
| 120 | "mapType": "A String", # The type of map that should be used for this location. EX: HYBRID, ROADMAP, SATELLITE, TERRAIN<br> |
| 121 | "latitude": 3.14, # The latitude of the location.<br> |
| 122 | "boundary": [ # The boundary of the location as a set of loops containing pairs of latitude, longitude coordinates.<br> |
| 123 | [<br> |
| 124 | {<br> |
| 125 | "latitude": 42,<br> |
| 126 | "longitude": 42,<br> |
| 127 | },<br> |
| 128 | ],<br> |
| 129 | ],<br> |
| 130 | "resolution": "A String", # The resolution of the location. Ex: POI_LEVEL<br> |
| 131 | "viewport": { # The viewport for showing this location. This is a latitude, longitude rectangle.<br> |
| 132 | "lo": {<br> |
| 133 | "latitude": 3.14,<br> |
| 134 | "longitude": 3.14,<br> |
| 135 | },<br> |
| 136 | "hi": {<br> |
| 137 | "latitude": 3.14,<br> |
| 138 | "longitude": 3.14,<br> |
| 139 | },<br> |
| 140 | },<br> |
| 141 | "cachePolicy": "A String", # The cache policy active for this data. EX: UNRESTRICTED, RESTRICTED, NEVER<br> |
| 142 | },<br> |
| 143 | "common": {<br> |
| 144 | "lang": "A String", # The language of the information url and description.<br> |
| 145 | "previewImageUrl": "A String", # The URL for the preview image information.<br> |
| 146 | "snippet": "A String", # The description for this location.<br> |
| 147 | "snippetUrl": "A String", # The URL for information for this location. Ex: wikipedia link.<br> |
| 148 | },<br> |
| 149 | },<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 150 | "id": "A String", # Unique id for this annotation data.<br> |
| 151 | "selfLink": "A String", # URL for this resource. *<br> |
| 152 | },<br> |
| 153 | ],<br> |
| 154 | "kind": "books#annotationsdata", # Resource type<br> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 155 | "totalItems": 42, # The total number of volume annotations found.<br> |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 156 | }</tt></dd></dl> |
| 157 | |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 158 | <dl><dt><a name="Resource-list_next"><strong>list_next</strong></a> = methodNext(self, previous_request, previous_response)</dt><dd><tt>Retrieves the next page of results.<br> |
| 159 | <br> |
| 160 | Args:<br> |
| 161 | previous_request: The request for the previous page.<br> |
| 162 | previous_response: The response from the request for the previous page.<br> |
| 163 | <br> |
| 164 | Returns:<br> |
| 165 | A request object that you can call 'execute()' on to request the next<br> |
| 166 | page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| 167 | |
Joe Gregorio | 4189954 | 2012-04-23 09:02:05 -0400 | [diff] [blame] | 168 | <hr> |
| 169 | Data descriptors defined here:<br> |
| 170 | <dl><dt><strong>__dict__</strong></dt> |
| 171 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 172 | </dl> |
| 173 | <dl><dt><strong>__weakref__</strong></dt> |
| 174 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 175 | </dl> |
| 176 | </td></tr></table> |
| 177 | </body></html> |