blob: 69c36a71808035a95da395a60a4a8ab5485bebb9 [file] [log] [blame]
Joe Gregorio075572b2012-07-09 16:53:09 -04001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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.mylibrary.html">mylibrary</a> . <a href="books_v1.mylibrary.annotations.html">annotations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(annotationId, source=None)</a></code></p>
79<p class="firstline">Deletes an annotation.</p>
80<p class="toc_element">
81 <code><a href="#get">get(annotationId, source=None)</a></code></p>
82<p class="firstline">Gets an annotation by its ID.</p>
83<p class="toc_element">
84 <code><a href="#insert">insert(body, source=None)</a></code></p>
85<p class="firstline">Inserts a new annotation.</p>
86<p class="toc_element">
87 <code><a href="#list">list(pageToken=None, updatedMax=None, layerId=None, volumeId=None, maxResults=None, showDeleted=None, pageIds=None, contentVersion=None, source=None, updatedMin=None)</a></code></p>
88<p class="firstline">Retrieves a list of annotations, possibly filtered.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#update">update(annotationId, body, source=None)</a></code></p>
94<p class="firstline">Updates an existing annotation.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="delete">delete(annotationId, source=None)</code>
98 <pre>Deletes an annotation.
99
100Args:
101 annotationId: string, The ID for the annotation to delete. (required)
102 source: string, String to identify the originator of this request.
103</pre>
104</div>
105
106<div class="method">
107 <code class="details" id="get">get(annotationId, source=None)</code>
108 <pre>Gets an annotation by its ID.
109
110Args:
111 annotationId: string, The ID for the annotation to retrieve. (required)
112 source: string, String to identify the originator of this request.
113
114Returns:
115 An object of the form:
116
117 {
118 "kind": "books#annotation", # Resource type.
119 "updated": "A String", # Timestamp for the last time this annotation was modified.
120 "created": "A String", # Timestamp for the created time of this annotation.
121 "deleted": True or False, # Indicates that this annotation is deleted.
122 "beforeSelectedText": "A String", # Anchor text before excerpt.
123 "currentVersionRanges": { # Selection ranges for the most recent content version.
124 "contentVersion": "A String", # Content version applicable to ranges below.
125 "gbTextRange": { # Range in GB text format for this annotation for version above.
126 "startPosition": "A String", # The starting position for the range.
127 "endPosition": "A String", # The ending position for the range.
128 "startOffset": "A String", # The offset from the starting position.
129 "endOffset": "A String", # The offset from the ending position.
130 },
131 "cfiRange": { # Range in CFI format for this annotation for version above.
132 "startPosition": "A String", # The starting position for the range.
133 "endPosition": "A String", # The ending position for the range.
134 "startOffset": "A String", # The offset from the starting position.
135 "endOffset": "A String", # The offset from the ending position.
136 },
137 "gbImageRange": { # Range in GB image format for this annotation for version above.
138 "startPosition": "A String", # The starting position for the range.
139 "endPosition": "A String", # The ending position for the range.
140 "startOffset": "A String", # The offset from the starting position.
141 "endOffset": "A String", # The offset from the ending position.
142 },
143 },
144 "afterSelectedText": "A String", # Anchor text after excerpt.
145 "clientVersionRanges": { # Selection ranges sent from the client.
146 "contentVersion": "A String", # Content version the client sent in.
147 "gbTextRange": { # Range in GB text format for this annotation sent by client.
148 "startPosition": "A String", # The starting position for the range.
149 "endPosition": "A String", # The ending position for the range.
150 "startOffset": "A String", # The offset from the starting position.
151 "endOffset": "A String", # The offset from the ending position.
152 },
153 "cfiRange": { # Range in CFI format for this annotation sent by client.
154 "startPosition": "A String", # The starting position for the range.
155 "endPosition": "A String", # The ending position for the range.
156 "startOffset": "A String", # The offset from the starting position.
157 "endOffset": "A String", # The offset from the ending position.
158 },
159 "gbImageRange": { # Range in GB image format for this annotation sent by client.
160 "startPosition": "A String", # The starting position for the range.
161 "endPosition": "A String", # The ending position for the range.
162 "startOffset": "A String", # The offset from the starting position.
163 "endOffset": "A String", # The offset from the ending position.
164 },
165 },
166 "volumeId": "A String", # The volume that this annotation belongs to.
167 "pageIds": [ # Pages that this annotation spans.
168 "A String",
169 ],
170 "layerId": "A String", # The layer this annotation is for.
171 "selectedText": "A String", # Excerpt from the volume.
172 "highlightStyle": "A String", # The highlight style for this annotation.
173 "data": "A String", # User-created data for this annotation.
174 "id": "A String", # Id of this annotation, in the form of a GUID.
175 "selfLink": "A String", # URL to this resource.
176 }</pre>
177</div>
178
179<div class="method">
180 <code class="details" id="insert">insert(body, source=None)</code>
181 <pre>Inserts a new annotation.
182
183Args:
184 body: object, The request body. (required)
185 The object takes the form of:
186
187{
188 "kind": "books#annotation", # Resource type.
189 "updated": "A String", # Timestamp for the last time this annotation was modified.
190 "created": "A String", # Timestamp for the created time of this annotation.
191 "deleted": True or False, # Indicates that this annotation is deleted.
192 "beforeSelectedText": "A String", # Anchor text before excerpt.
193 "currentVersionRanges": { # Selection ranges for the most recent content version.
194 "contentVersion": "A String", # Content version applicable to ranges below.
195 "gbTextRange": { # Range in GB text format for this annotation for version above.
196 "startPosition": "A String", # The starting position for the range.
197 "endPosition": "A String", # The ending position for the range.
198 "startOffset": "A String", # The offset from the starting position.
199 "endOffset": "A String", # The offset from the ending position.
200 },
201 "cfiRange": { # Range in CFI format for this annotation for version above.
202 "startPosition": "A String", # The starting position for the range.
203 "endPosition": "A String", # The ending position for the range.
204 "startOffset": "A String", # The offset from the starting position.
205 "endOffset": "A String", # The offset from the ending position.
206 },
207 "gbImageRange": { # Range in GB image format for this annotation for version above.
208 "startPosition": "A String", # The starting position for the range.
209 "endPosition": "A String", # The ending position for the range.
210 "startOffset": "A String", # The offset from the starting position.
211 "endOffset": "A String", # The offset from the ending position.
212 },
213 },
214 "afterSelectedText": "A String", # Anchor text after excerpt.
215 "clientVersionRanges": { # Selection ranges sent from the client.
216 "contentVersion": "A String", # Content version the client sent in.
217 "gbTextRange": { # Range in GB text format for this annotation sent by client.
218 "startPosition": "A String", # The starting position for the range.
219 "endPosition": "A String", # The ending position for the range.
220 "startOffset": "A String", # The offset from the starting position.
221 "endOffset": "A String", # The offset from the ending position.
222 },
223 "cfiRange": { # Range in CFI format for this annotation sent by client.
224 "startPosition": "A String", # The starting position for the range.
225 "endPosition": "A String", # The ending position for the range.
226 "startOffset": "A String", # The offset from the starting position.
227 "endOffset": "A String", # The offset from the ending position.
228 },
229 "gbImageRange": { # Range in GB image format for this annotation sent by client.
230 "startPosition": "A String", # The starting position for the range.
231 "endPosition": "A String", # The ending position for the range.
232 "startOffset": "A String", # The offset from the starting position.
233 "endOffset": "A String", # The offset from the ending position.
234 },
235 },
236 "volumeId": "A String", # The volume that this annotation belongs to.
237 "pageIds": [ # Pages that this annotation spans.
238 "A String",
239 ],
240 "layerId": "A String", # The layer this annotation is for.
241 "selectedText": "A String", # Excerpt from the volume.
242 "highlightStyle": "A String", # The highlight style for this annotation.
243 "data": "A String", # User-created data for this annotation.
244 "id": "A String", # Id of this annotation, in the form of a GUID.
245 "selfLink": "A String", # URL to this resource.
246 }
247
248 source: string, String to identify the originator of this request.
249
250Returns:
251 An object of the form:
252
253 {
254 "kind": "books#annotation", # Resource type.
255 "updated": "A String", # Timestamp for the last time this annotation was modified.
256 "created": "A String", # Timestamp for the created time of this annotation.
257 "deleted": True or False, # Indicates that this annotation is deleted.
258 "beforeSelectedText": "A String", # Anchor text before excerpt.
259 "currentVersionRanges": { # Selection ranges for the most recent content version.
260 "contentVersion": "A String", # Content version applicable to ranges below.
261 "gbTextRange": { # Range in GB text format for this annotation for version above.
262 "startPosition": "A String", # The starting position for the range.
263 "endPosition": "A String", # The ending position for the range.
264 "startOffset": "A String", # The offset from the starting position.
265 "endOffset": "A String", # The offset from the ending position.
266 },
267 "cfiRange": { # Range in CFI format for this annotation for version above.
268 "startPosition": "A String", # The starting position for the range.
269 "endPosition": "A String", # The ending position for the range.
270 "startOffset": "A String", # The offset from the starting position.
271 "endOffset": "A String", # The offset from the ending position.
272 },
273 "gbImageRange": { # Range in GB image format for this annotation for version above.
274 "startPosition": "A String", # The starting position for the range.
275 "endPosition": "A String", # The ending position for the range.
276 "startOffset": "A String", # The offset from the starting position.
277 "endOffset": "A String", # The offset from the ending position.
278 },
279 },
280 "afterSelectedText": "A String", # Anchor text after excerpt.
281 "clientVersionRanges": { # Selection ranges sent from the client.
282 "contentVersion": "A String", # Content version the client sent in.
283 "gbTextRange": { # Range in GB text format for this annotation sent by client.
284 "startPosition": "A String", # The starting position for the range.
285 "endPosition": "A String", # The ending position for the range.
286 "startOffset": "A String", # The offset from the starting position.
287 "endOffset": "A String", # The offset from the ending position.
288 },
289 "cfiRange": { # Range in CFI format for this annotation sent by client.
290 "startPosition": "A String", # The starting position for the range.
291 "endPosition": "A String", # The ending position for the range.
292 "startOffset": "A String", # The offset from the starting position.
293 "endOffset": "A String", # The offset from the ending position.
294 },
295 "gbImageRange": { # Range in GB image format for this annotation sent by client.
296 "startPosition": "A String", # The starting position for the range.
297 "endPosition": "A String", # The ending position for the range.
298 "startOffset": "A String", # The offset from the starting position.
299 "endOffset": "A String", # The offset from the ending position.
300 },
301 },
302 "volumeId": "A String", # The volume that this annotation belongs to.
303 "pageIds": [ # Pages that this annotation spans.
304 "A String",
305 ],
306 "layerId": "A String", # The layer this annotation is for.
307 "selectedText": "A String", # Excerpt from the volume.
308 "highlightStyle": "A String", # The highlight style for this annotation.
309 "data": "A String", # User-created data for this annotation.
310 "id": "A String", # Id of this annotation, in the form of a GUID.
311 "selfLink": "A String", # URL to this resource.
312 }</pre>
313</div>
314
315<div class="method">
316 <code class="details" id="list">list(pageToken=None, updatedMax=None, layerId=None, volumeId=None, maxResults=None, showDeleted=None, pageIds=None, contentVersion=None, source=None, updatedMin=None)</code>
317 <pre>Retrieves a list of annotations, possibly filtered.
318
319Args:
320 pageToken: string, The value of the nextToken from the previous page.
321 updatedMax: string, RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).
322 layerId: string, The layer ID to limit annotation by.
323 volumeId: string, The volume to restrict annotations to.
324 maxResults: integer, Maximum number of results to return
325 showDeleted: boolean, Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.
326 pageIds: string, The page ID(s) for the volume that is being queried. (repeated)
327 contentVersion: string, The content version for the requested volume.
328 source: string, String to identify the originator of this request.
329 updatedMin: string, RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).
330
331Returns:
332 An object of the form:
333
334 {
335 "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.
336 "items": [ # A list of annotations.
337 {
338 "kind": "books#annotation", # Resource type.
339 "updated": "A String", # Timestamp for the last time this annotation was modified.
340 "created": "A String", # Timestamp for the created time of this annotation.
341 "deleted": True or False, # Indicates that this annotation is deleted.
342 "beforeSelectedText": "A String", # Anchor text before excerpt.
343 "currentVersionRanges": { # Selection ranges for the most recent content version.
344 "contentVersion": "A String", # Content version applicable to ranges below.
345 "gbTextRange": { # Range in GB text format for this annotation for version above.
346 "startPosition": "A String", # The starting position for the range.
347 "endPosition": "A String", # The ending position for the range.
348 "startOffset": "A String", # The offset from the starting position.
349 "endOffset": "A String", # The offset from the ending position.
350 },
351 "cfiRange": { # Range in CFI format for this annotation for version above.
352 "startPosition": "A String", # The starting position for the range.
353 "endPosition": "A String", # The ending position for the range.
354 "startOffset": "A String", # The offset from the starting position.
355 "endOffset": "A String", # The offset from the ending position.
356 },
357 "gbImageRange": { # Range in GB image format for this annotation for version above.
358 "startPosition": "A String", # The starting position for the range.
359 "endPosition": "A String", # The ending position for the range.
360 "startOffset": "A String", # The offset from the starting position.
361 "endOffset": "A String", # The offset from the ending position.
362 },
363 },
364 "afterSelectedText": "A String", # Anchor text after excerpt.
365 "clientVersionRanges": { # Selection ranges sent from the client.
366 "contentVersion": "A String", # Content version the client sent in.
367 "gbTextRange": { # Range in GB text format for this annotation sent by client.
368 "startPosition": "A String", # The starting position for the range.
369 "endPosition": "A String", # The ending position for the range.
370 "startOffset": "A String", # The offset from the starting position.
371 "endOffset": "A String", # The offset from the ending position.
372 },
373 "cfiRange": { # Range in CFI format for this annotation sent by client.
374 "startPosition": "A String", # The starting position for the range.
375 "endPosition": "A String", # The ending position for the range.
376 "startOffset": "A String", # The offset from the starting position.
377 "endOffset": "A String", # The offset from the ending position.
378 },
379 "gbImageRange": { # Range in GB image format for this annotation sent by client.
380 "startPosition": "A String", # The starting position for the range.
381 "endPosition": "A String", # The ending position for the range.
382 "startOffset": "A String", # The offset from the starting position.
383 "endOffset": "A String", # The offset from the ending position.
384 },
385 },
386 "volumeId": "A String", # The volume that this annotation belongs to.
387 "pageIds": [ # Pages that this annotation spans.
388 "A String",
389 ],
390 "layerId": "A String", # The layer this annotation is for.
391 "selectedText": "A String", # Excerpt from the volume.
392 "highlightStyle": "A String", # The highlight style for this annotation.
393 "data": "A String", # User-created data for this annotation.
394 "id": "A String", # Id of this annotation, in the form of a GUID.
395 "selfLink": "A String", # URL to this resource.
396 },
397 ],
398 "kind": "books#annotations", # Resource type.
399 "totalItems": 42, # Total number of annotations found. This may be greater than the number of notes returned in this response if results have been paginated.
400 }</pre>
401</div>
402
403<div class="method">
404 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
405 <pre>Retrieves the next page of results.
406
407Args:
408 previous_request: The request for the previous page. (required)
409 previous_response: The response from the request for the previous page. (required)
410
411Returns:
412 A request object that you can call 'execute()' on to request the next
413 page. Returns None if there are no more items in the collection.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500414 </pre>
Joe Gregorio075572b2012-07-09 16:53:09 -0400415</div>
416
417<div class="method">
418 <code class="details" id="update">update(annotationId, body, source=None)</code>
419 <pre>Updates an existing annotation.
420
421Args:
422 annotationId: string, The ID for the annotation to update. (required)
423 body: object, The request body. (required)
424 The object takes the form of:
425
426{
427 "kind": "books#annotation", # Resource type.
428 "updated": "A String", # Timestamp for the last time this annotation was modified.
429 "created": "A String", # Timestamp for the created time of this annotation.
430 "deleted": True or False, # Indicates that this annotation is deleted.
431 "beforeSelectedText": "A String", # Anchor text before excerpt.
432 "currentVersionRanges": { # Selection ranges for the most recent content version.
433 "contentVersion": "A String", # Content version applicable to ranges below.
434 "gbTextRange": { # Range in GB text format for this annotation for version above.
435 "startPosition": "A String", # The starting position for the range.
436 "endPosition": "A String", # The ending position for the range.
437 "startOffset": "A String", # The offset from the starting position.
438 "endOffset": "A String", # The offset from the ending position.
439 },
440 "cfiRange": { # Range in CFI format for this annotation for version above.
441 "startPosition": "A String", # The starting position for the range.
442 "endPosition": "A String", # The ending position for the range.
443 "startOffset": "A String", # The offset from the starting position.
444 "endOffset": "A String", # The offset from the ending position.
445 },
446 "gbImageRange": { # Range in GB image format for this annotation for version above.
447 "startPosition": "A String", # The starting position for the range.
448 "endPosition": "A String", # The ending position for the range.
449 "startOffset": "A String", # The offset from the starting position.
450 "endOffset": "A String", # The offset from the ending position.
451 },
452 },
453 "afterSelectedText": "A String", # Anchor text after excerpt.
454 "clientVersionRanges": { # Selection ranges sent from the client.
455 "contentVersion": "A String", # Content version the client sent in.
456 "gbTextRange": { # Range in GB text format for this annotation sent by client.
457 "startPosition": "A String", # The starting position for the range.
458 "endPosition": "A String", # The ending position for the range.
459 "startOffset": "A String", # The offset from the starting position.
460 "endOffset": "A String", # The offset from the ending position.
461 },
462 "cfiRange": { # Range in CFI format for this annotation sent by client.
463 "startPosition": "A String", # The starting position for the range.
464 "endPosition": "A String", # The ending position for the range.
465 "startOffset": "A String", # The offset from the starting position.
466 "endOffset": "A String", # The offset from the ending position.
467 },
468 "gbImageRange": { # Range in GB image format for this annotation sent by client.
469 "startPosition": "A String", # The starting position for the range.
470 "endPosition": "A String", # The ending position for the range.
471 "startOffset": "A String", # The offset from the starting position.
472 "endOffset": "A String", # The offset from the ending position.
473 },
474 },
475 "volumeId": "A String", # The volume that this annotation belongs to.
476 "pageIds": [ # Pages that this annotation spans.
477 "A String",
478 ],
479 "layerId": "A String", # The layer this annotation is for.
480 "selectedText": "A String", # Excerpt from the volume.
481 "highlightStyle": "A String", # The highlight style for this annotation.
482 "data": "A String", # User-created data for this annotation.
483 "id": "A String", # Id of this annotation, in the form of a GUID.
484 "selfLink": "A String", # URL to this resource.
485 }
486
487 source: string, String to identify the originator of this request.
488
489Returns:
490 An object of the form:
491
492 {
493 "kind": "books#annotation", # Resource type.
494 "updated": "A String", # Timestamp for the last time this annotation was modified.
495 "created": "A String", # Timestamp for the created time of this annotation.
496 "deleted": True or False, # Indicates that this annotation is deleted.
497 "beforeSelectedText": "A String", # Anchor text before excerpt.
498 "currentVersionRanges": { # Selection ranges for the most recent content version.
499 "contentVersion": "A String", # Content version applicable to ranges below.
500 "gbTextRange": { # Range in GB text format for this annotation for version above.
501 "startPosition": "A String", # The starting position for the range.
502 "endPosition": "A String", # The ending position for the range.
503 "startOffset": "A String", # The offset from the starting position.
504 "endOffset": "A String", # The offset from the ending position.
505 },
506 "cfiRange": { # Range in CFI format for this annotation for version above.
507 "startPosition": "A String", # The starting position for the range.
508 "endPosition": "A String", # The ending position for the range.
509 "startOffset": "A String", # The offset from the starting position.
510 "endOffset": "A String", # The offset from the ending position.
511 },
512 "gbImageRange": { # Range in GB image format for this annotation for version above.
513 "startPosition": "A String", # The starting position for the range.
514 "endPosition": "A String", # The ending position for the range.
515 "startOffset": "A String", # The offset from the starting position.
516 "endOffset": "A String", # The offset from the ending position.
517 },
518 },
519 "afterSelectedText": "A String", # Anchor text after excerpt.
520 "clientVersionRanges": { # Selection ranges sent from the client.
521 "contentVersion": "A String", # Content version the client sent in.
522 "gbTextRange": { # Range in GB text format for this annotation sent by client.
523 "startPosition": "A String", # The starting position for the range.
524 "endPosition": "A String", # The ending position for the range.
525 "startOffset": "A String", # The offset from the starting position.
526 "endOffset": "A String", # The offset from the ending position.
527 },
528 "cfiRange": { # Range in CFI format for this annotation sent by client.
529 "startPosition": "A String", # The starting position for the range.
530 "endPosition": "A String", # The ending position for the range.
531 "startOffset": "A String", # The offset from the starting position.
532 "endOffset": "A String", # The offset from the ending position.
533 },
534 "gbImageRange": { # Range in GB image format for this annotation sent by client.
535 "startPosition": "A String", # The starting position for the range.
536 "endPosition": "A String", # The ending position for the range.
537 "startOffset": "A String", # The offset from the starting position.
538 "endOffset": "A String", # The offset from the ending position.
539 },
540 },
541 "volumeId": "A String", # The volume that this annotation belongs to.
542 "pageIds": [ # Pages that this annotation spans.
543 "A String",
544 ],
545 "layerId": "A String", # The layer this annotation is for.
546 "selectedText": "A String", # Excerpt from the volume.
547 "highlightStyle": "A String", # The highlight style for this annotation.
548 "data": "A String", # User-created data for this annotation.
549 "id": "A String", # Id of this annotation, in the form of a GUID.
550 "selfLink": "A String", # URL to this resource.
551 }</pre>
552</div>
553
554</body></html>