forked from google/gdata-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgdata.docs.client.html
More file actions
1149 lines (1018 loc) · 107 KB
/
gdata.docs.client.html
File metadata and controls
1149 lines (1018 loc) · 107 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module gdata.docs.client</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="gdata.html"><font color="#ffffff">gdata</font></a>.<a href="gdata.docs.html"><font color="#ffffff">docs</font></a>.client</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/docs/client.py">/usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/docs/client.py</a></font></td></tr></table>
<p><tt><a href="#DocsClient">DocsClient</a> simplifies interactions with the Documents List API.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="atom.html">atom</a><br>
<a href="copy.html">copy</a><br>
</td><td width="25%" valign=top><a href="gdata.html">gdata</a><br>
<a href="mimetypes.html">mimetypes</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
<a href="urllib.html">urllib</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="gdata.client.html#GDClient">gdata.client.GDClient</a>(<a href="atom.client.html#AtomPubClient">atom.client.AtomPubClient</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gdata.docs.client.html#DocsClient">DocsClient</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="gdata.client.html#Query">gdata.client.Query</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gdata.docs.client.html#DocsQuery">DocsQuery</a>
</font></dt></dl>
</dd>
</dl>
<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="DocsClient">class <strong>DocsClient</strong></a>(<a href="gdata.client.html#GDClient">gdata.client.GDClient</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Client for all features of the Google Documents List API.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gdata.docs.client.html#DocsClient">DocsClient</a></dd>
<dd><a href="gdata.client.html#GDClient">gdata.client.GDClient</a></dd>
<dd><a href="atom.client.html#AtomPubClient">atom.client.AtomPubClient</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="DocsClient-AddAclEntry"><strong>AddAclEntry</strong></a> = <a href="#DocsClient-add_acl_entry">add_acl_entry</a>(self, resource, acl_entry, send_notifications<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-BatchProcessAclEntries"><strong>BatchProcessAclEntries</strong></a> = <a href="#DocsClient-batch_process_acl_entries">batch_process_acl_entries</a>(self, resource, entries, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-CopyResource"><strong>CopyResource</strong></a> = <a href="#DocsClient-copy_resource">copy_resource</a>(self, entry, title, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-CreateArchive"><strong>CreateArchive</strong></a> = <a href="#DocsClient-create_archive">create_archive</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-CreateResource"><strong>CreateResource</strong></a> = <a href="#DocsClient-create_resource">create_resource</a>(self, entry, media<font color="#909090">=None</font>, collection<font color="#909090">=None</font>, create_uri<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DeleteAclEntry"><strong>DeleteAclEntry</strong></a> = <a href="#DocsClient-delete_acl_entry">delete_acl_entry</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DeleteArchive"><strong>DeleteArchive</strong></a> = <a href="#DocsClient-delete_archive">delete_archive</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DeleteResource"><strong>DeleteResource</strong></a> = <a href="#DocsClient-delete_resource">delete_resource</a>(self, entry, permanent<font color="#909090">=False</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DeleteRevision"><strong>DeleteRevision</strong></a> = <a href="#DocsClient-delete_revision">delete_revision</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DownloadArchive"><strong>DownloadArchive</strong></a> = <a href="#DocsClient-download_resource">download_resource</a>(self, entry, file_path, extra_params<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DownloadArchiveToMemory"><strong>DownloadArchiveToMemory</strong></a> = <a href="#DocsClient-download_resource_to_memory">download_resource_to_memory</a>(self, entry, extra_params<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DownloadResource"><strong>DownloadResource</strong></a> = <a href="#DocsClient-download_resource">download_resource</a>(self, entry, file_path, extra_params<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DownloadResourceToMemory"><strong>DownloadResourceToMemory</strong></a> = <a href="#DocsClient-download_resource_to_memory">download_resource_to_memory</a>(self, entry, extra_params<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DownloadRevision"><strong>DownloadRevision</strong></a> = <a href="#DocsClient-download_revision">download_revision</a>(self, entry, file_path, extra_params<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-DownloadRevisionToMemory"><strong>DownloadRevisionToMemory</strong></a> = <a href="#DocsClient-download_revision_to_memory">download_revision_to_memory</a>(self, entry, extra_params<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetAcl"><strong>GetAcl</strong></a> = <a href="#DocsClient-get_acl">get_acl</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetAclEntry"><strong>GetAclEntry</strong></a> = <a href="#DocsClient-get_acl_entry">get_acl_entry</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetAclEntryBySelfLink"><strong>GetAclEntryBySelfLink</strong></a> = <a href="#DocsClient-get_acl_entry_by_self_link">get_acl_entry_by_self_link</a>(self, self_link, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetAllResources"><strong>GetAllResources</strong></a> = <a href="#DocsClient-get_all_resources">get_all_resources</a>(self, uri<font color="#909090">=None</font>, show_root<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetArchive"><strong>GetArchive</strong></a> = <a href="#DocsClient-get_archive">get_archive</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetArchiveBySelfLink"><strong>GetArchiveBySelfLink</strong></a> = <a href="#DocsClient-get_archive_by_self_link">get_archive_by_self_link</a>(self, self_link, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetChanges"><strong>GetChanges</strong></a> = <a href="#DocsClient-get_changes">get_changes</a>(self, changestamp<font color="#909090">=None</font>, max_results<font color="#909090">=None</font>, show_root<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetMetadata"><strong>GetMetadata</strong></a> = <a href="#DocsClient-get_metadata">get_metadata</a>(self, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetResource"><strong>GetResource</strong></a> = <a href="#DocsClient-get_resource">get_resource</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetResourceAcl"><strong>GetResourceAcl</strong></a> = <a href="#DocsClient-get_resource_acl">get_resource_acl</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetResourceById"><strong>GetResourceById</strong></a> = <a href="#DocsClient-get_resource_by_id">get_resource_by_id</a>(self, resource_id, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetResourceBySelfLink"><strong>GetResourceBySelfLink</strong></a> = <a href="#DocsClient-get_resource_by_self_link">get_resource_by_self_link</a>(self, uri, etag<font color="#909090">=None</font>, show_root<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetResources"><strong>GetResources</strong></a> = <a href="#DocsClient-get_resources">get_resources</a>(self, uri<font color="#909090">=None</font>, limit<font color="#909090">=None</font>, show_root<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetRevision"><strong>GetRevision</strong></a> = <a href="#DocsClient-get_revision">get_revision</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetRevisionBySelfLink"><strong>GetRevisionBySelfLink</strong></a> = <a href="#DocsClient-get_revision_by_self_link">get_revision_by_self_link</a>(self, self_link, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetRevisions"><strong>GetRevisions</strong></a> = <a href="#DocsClient-get_revisions">get_revisions</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-MoveResource"><strong>MoveResource</strong></a> = <a href="#DocsClient-move_resource">move_resource</a>(self, entry, collection<font color="#909090">=None</font>, keep_in_collections<font color="#909090">=False</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-PublishRevision"><strong>PublishRevision</strong></a> = <a href="#DocsClient-publish_revision">publish_revision</a>(self, entry, publish_auto<font color="#909090">=None</font>, publish_outside_domain<font color="#909090">=False</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-Request"><strong>Request</strong></a> = <a href="#DocsClient-request">request</a>(self, method<font color="#909090">=None</font>, uri<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-UnpublishRevision"><strong>UnpublishRevision</strong></a> = <a href="#DocsClient-unpublish_revision">unpublish_revision</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-UpdateAclEntry"><strong>UpdateAclEntry</strong></a> = <a href="#DocsClient-update_acl_entry">update_acl_entry</a>(self, entry, send_notifications<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-UpdateArchive"><strong>UpdateArchive</strong></a> = <a href="#DocsClient-update_archive">update_archive</a>(self, entry, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-UpdateResource"><strong>UpdateResource</strong></a> = <a href="#DocsClient-update_resource">update_resource</a>(self, entry, media<font color="#909090">=None</font>, update_metadata<font color="#909090">=True</font>, new_revision<font color="#909090">=False</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-add_acl_entry"><strong>add_acl_entry</strong></a>(self, resource, acl_entry, send_notifications<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Adds the given AclEntry to the given Resource.<br>
<br>
Args:<br>
resource: gdata.docs.data.Resource to which to add AclEntry.<br>
acl_entry: gdata.docs.data.AclEntry representing ACL entry to add.<br>
send_notifications: True if users should be notified by email when<br>
this AclEntry is added.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-post">post</a>().<br>
<br>
Returns:<br>
gdata.docs.data.AclEntry containing information about new entry.<br>
Raises:<br>
ValueError: If given resource has no ACL link.</tt></dd></dl>
<dl><dt><a name="DocsClient-batch_process_acl_entries"><strong>batch_process_acl_entries</strong></a>(self, resource, entries, **kwargs)</dt><dd><tt>Applies the specified operation of each entry in a single request.<br>
<br>
To use this, simply set acl_entry.batch_operation to one of<br>
['query', 'insert', 'update', 'delete'], and optionally set<br>
acl_entry.batch_id to a string of your choice.<br>
<br>
Then, put all of your modified AclEntry objects into a list and pass<br>
that list as the entries parameter.<br>
<br>
Args:<br>
resource: gdata.docs.data.Resource to which the given entries belong.<br>
entries: [gdata.docs.data.AclEntry] to modify in some way.<br>
kwargs: Other args to pass to gdata.client.<a href="gdata.client.html#GDClient">GDClient</a>.<a href="#DocsClient-post">post</a>()<br>
<br>
Returns:<br>
Resulting gdata.docs.data.AclFeed of changes.</tt></dd></dl>
<dl><dt><a name="DocsClient-copy_resource"><strong>copy_resource</strong></a>(self, entry, title, **kwargs)</dt><dd><tt>Copies the given entry to a new entry with the given title.<br>
<br>
Note: Files do not support this feature.<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource to copy.<br>
title: String title for the new entry.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-post">post</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Resource representing duplicated resource.</tt></dd></dl>
<dl><dt><a name="DocsClient-create_archive"><strong>create_archive</strong></a>(self, entry, **kwargs)</dt><dd><tt>Creates a new archive of resources.<br>
<br>
Args:<br>
entry: gdata.docs.data.Archive representing metadata of archive to<br>
create.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-post">post</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Archive containing information about new archive.</tt></dd></dl>
<dl><dt><a name="DocsClient-create_resource"><strong>create_resource</strong></a>(self, entry, media<font color="#909090">=None</font>, collection<font color="#909090">=None</font>, create_uri<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Creates new entries in Google Docs, and uploads their contents.<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource representing initial version<br>
of entry being created. If media is also provided, the entry will<br>
first be created with the given metadata and content.<br>
media: (optional) gdata.data.MediaSource containing the file to be<br>
uploaded.<br>
collection: (optional) gdata.docs.data.Resource representing a collection<br>
in which this new entry should be created. If provided along<br>
with create_uri, create_uri will win (e.g. entry will be created at<br>
create_uri, not necessarily in given collection).<br>
create_uri: (optional) String URI at which to create the given entry. If<br>
collection, media and create_uri are None, use<br>
gdata.docs.client.RESOURCE_FEED_URI. If collection and create_uri are<br>
None, use gdata.docs.client.RESOURCE_UPLOAD_URI. If collection and<br>
media are not None,<br>
collection.GetResumableCreateMediaLink() is used,<br>
with the collection's resource ID substituted in.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-post">post</a>() and <a href="#DocsClient-update">update</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Resource containing information about new entry.</tt></dd></dl>
<dl><dt><a name="DocsClient-delete_acl_entry"><strong>delete_acl_entry</strong></a>(self, entry, **kwargs)</dt><dd><tt>Deletes the given AclEntry.<br>
<br>
Args:<br>
entry: gdata.docs.data.AclEntry to delete.<br>
kwargs: Other args to pass to gdata.client.<a href="gdata.client.html#GDClient">GDClient</a>.<a href="#DocsClient-Delete">Delete</a>()<br>
<br>
Returns:<br>
Result of delete request.</tt></dd></dl>
<dl><dt><a name="DocsClient-delete_archive"><strong>delete_archive</strong></a>(self, entry, **kwargs)</dt><dd><tt>Aborts the given Archive operation, or deletes the Archive.<br>
<br>
Args:<br>
entry: gdata.docs.data.Archive to delete.<br>
kwargs: Other args to pass to gdata.client.<a href="gdata.client.html#GDClient">GDClient</a>.<a href="#DocsClient-Delete">Delete</a>()<br>
<br>
Returns:<br>
Result of delete request.</tt></dd></dl>
<dl><dt><a name="DocsClient-delete_resource"><strong>delete_resource</strong></a>(self, entry, permanent<font color="#909090">=False</font>, **kwargs)</dt><dd><tt>Trashes or deletes the given entry.<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource to trash or delete.<br>
permanent: True to skip the trash and delete the entry forever.<br>
kwargs: Other args to pass to gdata.client.<a href="gdata.client.html#GDClient">GDClient</a>.<a href="#DocsClient-Delete">Delete</a>()<br>
<br>
Returns:<br>
Result of delete request.</tt></dd></dl>
<dl><dt><a name="DocsClient-delete_revision"><strong>delete_revision</strong></a>(self, entry, **kwargs)</dt><dd><tt>Deletes the given Revision.<br>
<br>
Args:<br>
entry: gdata.docs.data.Revision to delete.<br>
kwargs: Other args to pass to gdata.client.<a href="gdata.client.html#GDClient">GDClient</a>.<a href="#DocsClient-Delete">Delete</a>()<br>
<br>
Returns:<br>
Result of delete request.</tt></dd></dl>
<dl><dt><a name="DocsClient-download_archive"><strong>download_archive</strong></a> = <a href="#DocsClient-download_resource">download_resource</a>(self, entry, file_path, extra_params<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-download_archive_to_memory"><strong>download_archive_to_memory</strong></a> = <a href="#DocsClient-download_resource_to_memory">download_resource_to_memory</a>(self, entry, extra_params<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-download_resource"><strong>download_resource</strong></a>(self, entry, file_path, extra_params<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Downloads the contents of the given entry to disk.<br>
<br>
Note: to download a file in memory, use the <a href="#DocsClient-DownloadResourceToMemory">DownloadResourceToMemory</a>()<br>
method.<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource whose contents to fetch.<br>
file_path: str Full path to which to save file.<br>
extra_params: dict (optional) A map of any further parameters to control<br>
how the document is downloaded/exported. For example, exporting a<br>
spreadsheet as a .csv: extra_params={'gid': 0, 'exportFormat': 'csv'}<br>
kwargs: Other parameters to pass to _download_file().<br>
<br>
Raises:<br>
gdata.client.RequestError if the download URL is malformed or the server's<br>
response was not successful.</tt></dd></dl>
<dl><dt><a name="DocsClient-download_resource_to_memory"><strong>download_resource_to_memory</strong></a>(self, entry, extra_params<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Returns the contents of the given entry.<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource whose contents to fetch.<br>
extra_params: dict (optional) A map of any further parameters to control<br>
how the document is downloaded/exported. For example, exporting a<br>
spreadsheet as a .csv: extra_params={'gid': 0, 'exportFormat': 'csv'}<br>
kwargs: Other parameters to pass to _get_content().<br>
<br>
Returns:<br>
Content of given resource after being downloaded.<br>
<br>
Raises:<br>
gdata.client.RequestError if the download URL is malformed or the server's<br>
response was not successful.</tt></dd></dl>
<dl><dt><a name="DocsClient-download_revision"><strong>download_revision</strong></a>(self, entry, file_path, extra_params<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Downloads the contents of the given revision to disk.<br>
<br>
Note: to download a revision in memory, use the <a href="#DocsClient-DownloadRevisionToMemory">DownloadRevisionToMemory</a>()<br>
method.<br>
<br>
Args:<br>
entry: gdata.docs.data.Revision whose contents to fetch.<br>
file_path: str Full path to which to save file.<br>
extra_params: dict (optional) A map of any further parameters to control<br>
how the document is downloaded.<br>
kwargs: Other parameters to pass to _download_file().<br>
<br>
Raises:<br>
gdata.client.RequestError if the download URL is malformed or the server's<br>
response was not successful.</tt></dd></dl>
<dl><dt><a name="DocsClient-download_revision_to_memory"><strong>download_revision_to_memory</strong></a>(self, entry, extra_params<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Returns the contents of the given revision.<br>
<br>
Args:<br>
entry: gdata.docs.data.Revision whose contents to fetch.<br>
extra_params: dict (optional) A map of any further parameters to control<br>
how the document is downloaded/exported.<br>
kwargs: Other parameters to pass to _get_content().<br>
<br>
Returns:<br>
Content of given revision after being downloaded.<br>
<br>
Raises:<br>
gdata.client.RequestError if the download URL is malformed or the server's<br>
response was not successful.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_acl"><strong>get_acl</strong></a>(self, entry, **kwargs)</dt><dd><tt>Retrieves an AclFeed for the given resource.<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource to fetch AclFeed for.<br>
kwargs: Other args to pass to <a href="#DocsClient-GetFeed">GetFeed</a>().<br>
Returns:<br>
gdata.docs.data.AclFeed representing retrieved entries.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_acl_entry"><strong>get_acl_entry</strong></a>(self, entry, **kwargs)</dt><dd><tt>Retrieves an AclEntry again.<br>
<br>
This is useful if you need to poll for an ACL changing.<br>
<br>
Args:<br>
entry: gdata.docs.data.AclEntry to fetch and return.<br>
kwargs: Other args to pass to <a href="#DocsClient-GetAclEntryBySelfLink">GetAclEntryBySelfLink</a>().<br>
Returns:<br>
gdata.docs.data.AclEntry representing retrieved entry.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_acl_entry_by_self_link"><strong>get_acl_entry_by_self_link</strong></a>(self, self_link, **kwargs)</dt><dd><tt>Retrieves a particular AclEntry by its self link.<br>
<br>
Args:<br>
self_link: URI at which to query for given ACL entry. This can be found<br>
using entry.GetSelfLink().<br>
kwargs: Other parameters to pass to <a href="#DocsClient-get_entry">get_entry</a>().<br>
<br>
Returns:<br>
gdata.docs.data.AclEntry representing the retrieved entry.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_all_resources"><strong>get_all_resources</strong></a>(self, uri<font color="#909090">=None</font>, show_root<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Retrieves all of a user's non-collections or everything at the given URI.<br>
<br>
Folders are not included in this by default. Pass in a custom URI to<br>
include collections in your query. The <a href="#DocsQuery">DocsQuery</a> class is an easy way to<br>
generate such a URI.<br>
<br>
This method makes multiple HTTP requests (by following the feed's next<br>
links) in order to fetch the user's entire document list.<br>
<br>
Args:<br>
uri: (optional) URI to query the doclist feed with. If None, then use<br>
<a href="#DocsClient">DocsClient</a>.RESOURCE_FEED_URI, which will retrieve all<br>
non-collections.<br>
show_root: (optional) True to include indications if a resource is in<br>
the root collection.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-GetResources">GetResources</a>().<br>
<br>
Returns:<br>
List of gdata.docs.data.Resource objects representing the retrieved<br>
entries.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_archive"><strong>get_archive</strong></a>(self, entry, **kwargs)</dt><dd><tt>Retrieves an archive again given its entry.<br>
<br>
This is useful if you need to poll for an archive completing.<br>
<br>
Args:<br>
entry: gdata.docs.data.Archive to fetch and return.<br>
kwargs: Other args to pass to <a href="#DocsClient-GetArchiveBySelfLink">GetArchiveBySelfLink</a>().<br>
Returns:<br>
gdata.docs.data.Archive representing retrieved archive.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_archive_by_self_link"><strong>get_archive_by_self_link</strong></a>(self, self_link, **kwargs)</dt><dd><tt>Retrieves a particular archive by its self link.<br>
<br>
Args:<br>
self_link: URI at which to query for given archive. This can be found<br>
using entry.GetSelfLink().<br>
kwargs: Other parameters to pass to <a href="#DocsClient-get_entry">get_entry</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Archive representing the retrieved archive.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_changes"><strong>get_changes</strong></a>(self, changestamp<font color="#909090">=None</font>, max_results<font color="#909090">=None</font>, show_root<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Retrieves changes to a user's documents list.<br>
<br>
Args:<br>
changestamp: (optional) String changestamp value to query since.<br>
If provided, returned changes will have a changestamp larger than<br>
the given one.<br>
max_results: (optional) Number of results to fetch. API will limit<br>
this number to 100 at most.<br>
show_root: (optional) True to include indications if a resource is in<br>
the root collection.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-get_feed">get_feed</a>().<br>
<br>
Returns:<br>
gdata.docs.data.ChangeFeed.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_metadata"><strong>get_metadata</strong></a>(self, **kwargs)</dt><dd><tt>Retrieves the metadata of a user account.<br>
<br>
Args:<br>
kwargs: Other parameters to pass to <a href="#DocsClient-get_entry">get_entry</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Metadata representing metadata of user's account.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_resource"><strong>get_resource</strong></a>(self, entry, **kwargs)</dt><dd><tt>Retrieves a resource again given its entry.<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource to fetch and return.<br>
kwargs: Other args to pass to <a href="#DocsClient-GetResourceBySelfLink">GetResourceBySelfLink</a>().<br>
Returns:<br>
gdata.docs.data.Resource representing retrieved resource.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_resource_acl"><strong>get_resource_acl</strong></a>(self, entry, **kwargs)</dt><dd><tt>Retrieves the ACL sharing permissions for the given entry.<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource for which to get ACL.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-get_feed">get_feed</a>().<br>
<br>
Returns:<br>
gdata.docs.data.AclFeed representing the resource's ACL.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_resource_by_id"><strong>get_resource_by_id</strong></a>(self, resource_id, **kwargs)</dt><dd><tt>Retrieves a resource again given its resource ID.<br>
<br>
Args:<br>
resource_id: Typed or untyped resource ID of a resource.<br>
kwargs: Other args to pass to <a href="#DocsClient-GetResourceBySelfLink">GetResourceBySelfLink</a>().<br>
Returns:<br>
gdata.docs.data.Resource representing retrieved resource.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_resource_by_self_link"><strong>get_resource_by_self_link</strong></a>(self, uri, etag<font color="#909090">=None</font>, show_root<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Retrieves a particular resource by its self link.<br>
<br>
Args:<br>
uri: str URI at which to query for given resource. This can be found<br>
using entry.GetSelfLink().<br>
etag: str (optional) The document/item's etag value to be used in a<br>
conditional GET. See <a href="http://code.google.com/apis/documents/docs/3.0/">http://code.google.com/apis/documents/docs/3.0/</a><br>
developers_guide_protocol.html#RetrievingCached.<br>
show_root: (optional) True to include indications if a resource is in<br>
the root collection.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-get_entry">get_entry</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Resource representing the retrieved resource.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_resources"><strong>get_resources</strong></a>(self, uri<font color="#909090">=None</font>, limit<font color="#909090">=None</font>, show_root<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Retrieves the resources in a user's docslist, or the given URI.<br>
<br>
Args:<br>
uri: (optional) URI to query for resources. If None, then<br>
gdata.docs.client.<a href="#DocsClient">DocsClient</a>.RESOURCE_FEED_URI is used, which will<br>
query for all non-collections.<br>
limit: int (optional) A maximum cap for the number of results to<br>
return in the feed. By default, the API returns a maximum of 100<br>
per page. Thus, if you set limit=5000, you will get <= 5000<br>
documents (guarenteed no more than 5000), and will need to follow the<br>
feed's next links (feed.GetNextLink()) to the rest. See<br>
get_everything(). Similarly, if you set limit=50, only <= 50<br>
documents are returned. Note: if the max-results parameter is set in<br>
the uri parameter, it is chosen over a value set for limit.<br>
show_root: (optional) True to include indications if a resource is in<br>
the root collection.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-get_feed">get_feed</a>().<br>
<br>
Returns:<br>
gdata.docs.data.ResourceFeed feed.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_revision"><strong>get_revision</strong></a>(self, entry, **kwargs)</dt><dd><tt>Retrieves a revision again given its entry.<br>
<br>
Args:<br>
entry: gdata.docs.data.Revision to fetch and return.<br>
kwargs: Other args to pass to <a href="#DocsClient-GetRevisionBySelfLink">GetRevisionBySelfLink</a>().<br>
Returns:<br>
gdata.docs.data.Revision representing retrieved revision.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_revision_by_self_link"><strong>get_revision_by_self_link</strong></a>(self, self_link, **kwargs)</dt><dd><tt>Retrieves a particular reivision by its self link.<br>
<br>
Args:<br>
self_link: URI at which to query for given revision. This can be found<br>
using entry.GetSelfLink().<br>
kwargs: Other parameters to pass to <a href="#DocsClient-get_entry">get_entry</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Revision representing the retrieved revision.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_revisions"><strong>get_revisions</strong></a>(self, entry, **kwargs)</dt><dd><tt>Retrieves the revision history for a resource.<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource for which to get revisions.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-get_feed">get_feed</a>().<br>
<br>
Returns:<br>
gdata.docs.data.RevisionFeed representing the resource's revisions.</tt></dd></dl>
<dl><dt><a name="DocsClient-move_resource"><strong>move_resource</strong></a>(self, entry, collection<font color="#909090">=None</font>, keep_in_collections<font color="#909090">=False</font>, **kwargs)</dt><dd><tt>Moves an item into a different collection (or out of all collections).<br>
<br>
Args:<br>
entry: gdata.docs.data.Resource to move.<br>
collection: gdata.docs.data.Resource (optional) An object representing<br>
the destination collection. If None, set keep_in_collections to<br>
False to remove the item from all collections.<br>
keep_in_collections: boolean (optional) If True, the given entry<br>
is not removed from any existing collections it is already in.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-post">post</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Resource of the moved entry.</tt></dd></dl>
<dl><dt><a name="DocsClient-publish_revision"><strong>publish_revision</strong></a>(self, entry, publish_auto<font color="#909090">=None</font>, publish_outside_domain<font color="#909090">=False</font>, **kwargs)</dt><dd><tt>Publishes the given revision.<br>
<br>
This method can only be used for document revisions.<br>
<br>
Args:<br>
entry: Revision to update.<br>
publish_auto: True to automatically publish future revisions of the<br>
document. False to not automatically publish future revisions.<br>
None to take no action and use the default value.<br>
publish_outside_domain: True to make the published revision available<br>
outside of a Google Apps domain. False to not publish outside<br>
the domain. None to use the default value.<br>
kwargs: Other parameters to pass to super(<a href="#DocsClient">DocsClient</a>, self).<a href="#DocsClient-update">update</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Revision representing the updated revision.</tt></dd></dl>
<dl><dt><a name="DocsClient-request"><strong>request</strong></a>(self, method<font color="#909090">=None</font>, uri<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Add support for imitating other users via 2-Legged OAuth.<br>
<br>
Args:<br>
uri: (optional) URI of the request in which to replace default with<br>
self.<strong>xoauth_requestor_id</strong>.<br>
Returns:<br>
Result of super(<a href="#DocsClient">DocsClient</a>, self).<a href="#DocsClient-request">request</a>().</tt></dd></dl>
<dl><dt><a name="DocsClient-unpublish_revision"><strong>unpublish_revision</strong></a>(self, entry, **kwargs)</dt><dd><tt>Unpublishes the given revision.<br>
<br>
This method can only be used for document revisions.<br>
<br>
Args:<br>
entry: Revision to update.<br>
kwargs: Other parameters to pass to super(<a href="#DocsClient">DocsClient</a>, self).<a href="#DocsClient-update">update</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Revision representing the updated revision.</tt></dd></dl>
<dl><dt><a name="DocsClient-update_acl_entry"><strong>update_acl_entry</strong></a>(self, entry, send_notifications<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Updates the given AclEntry with new metadata.<br>
<br>
Args:<br>
entry: AclEntry to update. Make any metadata changes to this entry.<br>
send_notifications: True if users should be notified by email when<br>
this AclEntry is updated.<br>
kwargs: Other parameters to pass to super(<a href="#DocsClient">DocsClient</a>, self).<a href="#DocsClient-update">update</a>().<br>
<br>
Returns:<br>
gdata.docs.data.AclEntry representing the updated ACL entry.</tt></dd></dl>
<dl><dt><a name="DocsClient-update_archive"><strong>update_archive</strong></a>(self, entry, **kwargs)</dt><dd><tt>Updates the given Archive with new metadata.<br>
<br>
This method is really only useful for updating the notification email<br>
address of an archive that is being processed.<br>
<br>
Args:<br>
entry: Archive to update. Make any metadata changes to this entry.<br>
kwargs: Other parameters to pass to super(<a href="#DocsClient">DocsClient</a>, self).<a href="#DocsClient-update">update</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Archive representing the updated archive.</tt></dd></dl>
<dl><dt><a name="DocsClient-update_resource"><strong>update_resource</strong></a>(self, entry, media<font color="#909090">=None</font>, update_metadata<font color="#909090">=True</font>, new_revision<font color="#909090">=False</font>, **kwargs)</dt><dd><tt>Updates an entry in Google Docs with new metadata and/or new data.<br>
<br>
Args:<br>
entry: Entry to update. Make any metadata changes to this entry.<br>
media: (optional) gdata.data.MediaSource object containing the file with<br>
which to replace the entry's data.<br>
update_metadata: (optional) True to update the metadata from the entry<br>
itself. You might set this to False to only update an entry's<br>
file content, and not its metadata.<br>
new_revision: (optional) True to create a new revision with this update,<br>
False otherwise.<br>
kwargs: Other parameters to pass to <a href="#DocsClient-post">post</a>().<br>
<br>
Returns:<br>
gdata.docs.data.Resource representing the updated entry.</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>alt_auth_service</strong> = 'wise'</dl>
<dl><dt><strong>alt_auth_token</strong> = None</dl>
<dl><dt><strong>api_version</strong> = '3.0'</dl>
<dl><dt><strong>auth_scopes</strong> = ('https://docs.google.com/feeds/', 'https://spreadsheets.google.com/feeds/', 'https://docs.googleusercontent.com/')</dl>
<dl><dt><strong>auth_service</strong> = 'writely'</dl>
<dl><dt><strong>host</strong> = 'docs.google.com'</dl>
<dl><dt><strong>ssl</strong> = True</dl>
<hr>
Methods inherited from <a href="gdata.client.html#GDClient">gdata.client.GDClient</a>:<br>
<dl><dt><a name="DocsClient-Batch"><strong>Batch</strong></a> = batch(self, feed, uri<font color="#909090">=None</font>, force<font color="#909090">=False</font>, auth_token<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Sends a batch request to the server to execute operation entries.<br>
<br>
Args:<br>
feed: A batch feed containing batch entries, each is an operation.<br>
uri: (optional) The uri to which the batch request feed should be POSTed.<br>
If none is provided, then the feed's edit link will be used.<br>
force: (optional) boolean set to True if you want the batch update to<br>
clobber all data. If False, the version in the information in the<br>
feed object will cause the server to check to see that no changes<br>
intervened between when you fetched the data and when you sent the<br>
changes.<br>
auth_token: (optional) An object which sets the Authorization HTTP header<br>
in its modify_request method. Recommended classes include<br>
gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken<br>
among others.</tt></dd></dl>
<dl><dt><a name="DocsClient-ClientLogin"><strong>ClientLogin</strong></a> = client_login(self, email, password, source, service<font color="#909090">=None</font>, account_type<font color="#909090">='HOSTED_OR_GOOGLE'</font>, auth_url<font color="#909090">=<atom.http_core.Uri object></font>, captcha_token<font color="#909090">=None</font>, captcha_response<font color="#909090">=None</font>)</dt><dd><tt>Performs an auth request using the user's email address and password.<br>
<br>
In order to modify user specific data and read user private data, your<br>
application must be authorized by the user. One way to demonstrage<br>
authorization is by including a Client Login token in the Authorization<br>
HTTP header of all requests. This method requests the Client Login token<br>
by sending the user's email address, password, the name of the<br>
application, and the service code for the service which will be accessed<br>
by the application. If the username and password are correct, the server<br>
will respond with the client login code and a new ClientLoginToken<br>
object will be set in the client's auth_token member. With the auth_token<br>
set, future requests from this client will include the Client Login<br>
token.<br>
<br>
For a list of service names, see <br>
<a href="http://code.google.com/apis/gdata/faq.html#clientlogin">http://code.google.com/apis/gdata/faq.html#clientlogin</a><br>
For more information on Client Login, see:<br>
<a href="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html">http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html</a><br>
<br>
Args:<br>
email: str The user's email address or username.<br>
password: str The password for the user's account.<br>
source: str The name of your application. This can be anything you<br>
like but should should give some indication of which app is<br>
making the request.<br>
service: str The service code for the service you would like to access.<br>
For example, 'cp' for contacts, 'cl' for calendar. For a full<br>
list see<br>
<a href="http://code.google.com/apis/gdata/faq.html#clientlogin">http://code.google.com/apis/gdata/faq.html#clientlogin</a><br>
If you are using a subclass of the gdata.client.<a href="gdata.client.html#GDClient">GDClient</a>, the<br>
service will usually be filled in for you so you do not need<br>
to specify it. For example see BloggerClient,<br>
SpreadsheetsClient, etc.<br>
account_type: str (optional) The type of account which is being<br>
authenticated. This can be either 'GOOGLE' for a Google<br>
Account, 'HOSTED' for a Google Apps Account, or the<br>
default 'HOSTED_OR_GOOGLE' which will select the Google<br>
Apps Account if the same email address is used for both<br>
a Google Account and a Google Apps Account.<br>
auth_url: str (optional) The URL to which the login request should be<br>
sent.<br>
captcha_token: str (optional) If a previous login attempt was reponded<br>
to with a CAPTCHA challenge, this is the token which<br>
identifies the challenge (from the CAPTCHA's URL).<br>
captcha_response: str (optional) If a previous login attempt was<br>
reponded to with a CAPTCHA challenge, this is the<br>
response text which was contained in the challenge.<br>
<br>
Returns:<br>
Generated token, which is also stored in this object.<br>
<br>
Raises:<br>
A RequestError or one of its suclasses: BadAuthentication,<br>
BadAuthenticationServiceURL, ClientLoginFailed,<br>
ClientLoginTokenMissing, or CaptchaChallenge</tt></dd></dl>
<dl><dt><a name="DocsClient-Delete"><strong>Delete</strong></a> = delete(self, entry_or_uri, auth_token<font color="#909090">=None</font>, force<font color="#909090">=False</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetAccessToken"><strong>GetAccessToken</strong></a> = get_access_token(self, request_token, url<font color="#909090">='https://www.google.com/accounts/OAuthGetAccessToken'</font>)</dt><dd><tt>Exchanges an authorized OAuth request token for an access token.<br>
<br>
Contacts the Google OAuth server to upgrade a previously authorized<br>
request token. Once the request token is upgraded to an access token,<br>
the access token may be used to access the user's data.<br>
<br>
For more details, see the Google Accounts OAuth documentation:<br>
<a href="http://code.google.com/apis/accounts/docs/OAuth.html#AccessToken">http://code.google.com/apis/accounts/docs/OAuth.html#AccessToken</a><br>
<br>
Args:<br>
request_token: An OAuth token which has been authorized by the user.<br>
url: (optional) The URL to which the upgrade request should be sent.<br>
Defaults to: https://www.google.com/accounts/OAuthAuthorizeToken</tt></dd></dl>
<dl><dt><a name="DocsClient-GetEntry"><strong>GetEntry</strong></a> = get_entry(self, uri, auth_token<font color="#909090">=None</font>, converter<font color="#909090">=None</font>, desired_class<font color="#909090">=<class 'gdata.data.GDEntry'></font>, etag<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetFeed"><strong>GetFeed</strong></a> = get_feed(self, uri, auth_token<font color="#909090">=None</font>, converter<font color="#909090">=None</font>, desired_class<font color="#909090">=<class 'gdata.data.GDFeed'></font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-GetNext"><strong>GetNext</strong></a> = get_next(self, feed, auth_token<font color="#909090">=None</font>, converter<font color="#909090">=None</font>, desired_class<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Fetches the next set of results from the feed.<br>
<br>
When requesting a feed, the number of entries returned is capped at a<br>
service specific default limit (often 25 entries). You can specify your<br>
own entry-count cap using the max-results URL query parameter. If there<br>
are more results than could fit under max-results, the feed will contain<br>
a next link. This method performs a GET against this next results URL.<br>
<br>
Returns:<br>
A new feed object containing the next set of entries in this feed.</tt></dd></dl>
<dl><dt><a name="DocsClient-GetOAuthToken"><strong>GetOAuthToken</strong></a> = get_oauth_token(self, scopes, next, consumer_key, consumer_secret<font color="#909090">=None</font>, rsa_private_key<font color="#909090">=None</font>, url<font color="#909090">='https://www.google.com/accounts/OAuthGetRequestToken'</font>)</dt><dd><tt>Obtains an OAuth request token to allow the user to authorize this app.<br>
<br>
Once this client has a request token, the user can authorize the request<br>
token by visiting the authorization URL in their browser. After being<br>
redirected back to this app at the 'next' URL, this app can then exchange<br>
the authorized request token for an access token.<br>
<br>
For more information see the documentation on Google Accounts with OAuth:<br>
<a href="http://code.google.com/apis/accounts/docs/OAuth.html#AuthProcess">http://code.google.com/apis/accounts/docs/OAuth.html#AuthProcess</a><br>
<br>
Args:<br>
scopes: list of strings or atom.http_core.Uri objects which specify the<br>
URL prefixes which this app will be accessing. For example, to access<br>
the Google Calendar API, you would want to use scopes:<br>
['https://www.google.com/calendar/feeds/',<br>
'<a href="http://www.google.com/calendar/feeds/">http://www.google.com/calendar/feeds/</a>']<br>
next: str or atom.http_core.Uri object, The URL which the user's browser<br>
should be sent to after they authorize access to their data. This<br>
should be a URL in your application which will read the token<br>
information from the URL and upgrade the request token to an access<br>
token.<br>
consumer_key: str This is the identifier for this application which you<br>
should have received when you registered your application with Google<br>
to use OAuth.<br>
consumer_secret: str (optional) The shared secret between your app and<br>
Google which provides evidence that this request is coming from you<br>
application and not another app. If present, this libraries assumes<br>
you want to use an HMAC signature to verify requests. Keep this data<br>
a secret.<br>
rsa_private_key: str (optional) The RSA private key which is used to<br>
generate a digital signature which is checked by Google's server. If<br>
present, this library assumes that you want to use an RSA signature<br>
to verify requests. Keep this data a secret.<br>
url: The URL to which a request for a token should be made. The default<br>
is Google's OAuth request token provider.</tt></dd></dl>
<dl><dt><a name="DocsClient-ModifyRequest"><strong>ModifyRequest</strong></a> = modify_request(self, http_request)</dt><dd><tt>Adds or changes request before making the HTTP request.<br>
<br>
This client will add the API version if it is specified.<br>
Subclasses may override this method to add their own request<br>
modifications before the request is made.</tt></dd></dl>
<dl><dt><a name="DocsClient-Post"><strong>Post</strong></a> = post(self, entry, uri, auth_token<font color="#909090">=None</font>, converter<font color="#909090">=None</font>, desired_class<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-RequestClientLoginToken"><strong>RequestClientLoginToken</strong></a> = request_client_login_token(self, email, password, source, service<font color="#909090">=None</font>, account_type<font color="#909090">='HOSTED_OR_GOOGLE'</font>, auth_url<font color="#909090">=<atom.http_core.Uri object></font>, captcha_token<font color="#909090">=None</font>, captcha_response<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="DocsClient-RevokeToken"><strong>RevokeToken</strong></a> = revoke_token(self, token<font color="#909090">=None</font>, url<font color="#909090">=<atom.http_core.Uri object></font>)</dt><dd><tt>Requests that the token be invalidated.<br>
<br>
This method can be used for both AuthSub and OAuth tokens (to invalidate<br>
a ClientLogin token, the user must change their password).<br>
<br>
Returns:<br>
True if the server responded with a 200.<br>
<br>
Raises:<br>
A RequestError if the server responds with a non-200 status.</tt></dd></dl>
<dl><dt><a name="DocsClient-Update"><strong>Update</strong></a> = update(self, entry, auth_token<font color="#909090">=None</font>, force<font color="#909090">=False</font>, uri<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Edits the entry on the server by sending the XML for this entry.<br>
<br>
Performs a PUT and converts the response to a new entry object with a<br>
matching class to the entry passed in.<br>
<br>
Args:<br>
entry:<br>
auth_token:<br>
force: boolean stating whether an update should be forced. Defaults to<br>
False. Normally, if a change has been made since the passed in<br>
entry was obtained, the server will not overwrite the entry since<br>
the changes were based on an obsolete version of the entry.<br>
Setting force to True will cause the update to silently<br>
overwrite whatever version is present.<br>
uri: The uri to put to. If provided, this uri is PUT to rather than the<br>
inferred uri from the entry's edit link.<br>
<br>
Returns:<br>
A new Entry object of a matching type to the entry which was passed in.</tt></dd></dl>
<dl><dt><a name="DocsClient-UpgradeToken"><strong>UpgradeToken</strong></a> = upgrade_token(self, token<font color="#909090">=None</font>, url<font color="#909090">=<atom.http_core.Uri object></font>)</dt><dd><tt>Asks the Google auth server for a multi-use AuthSub token.<br>
<br>
For details on AuthSub, see:<br>
<a href="http://code.google.com/apis/accounts/docs/AuthSub.html">http://code.google.com/apis/accounts/docs/AuthSub.html</a><br>
<br>
Args:<br>
token: gdata.gauth.AuthSubToken or gdata.gauth.SecureAuthSubToken<br>
(optional) If no token is passed in, the client's auth_token member<br>
is used to request the new token. The token object will be modified<br>
to contain the new session token string.<br>
url: str or atom.http_core.Uri (optional) The URL to which the token<br>
upgrade request should be sent. Defaults to:<br>
https://www.google.com/accounts/AuthSubSessionToken<br>
<br>
Returns:<br>
The upgraded gdata.gauth.AuthSubToken object.</tt></dd></dl>
<dl><dt><a name="DocsClient-batch"><strong>batch</strong></a>(self, feed, uri<font color="#909090">=None</font>, force<font color="#909090">=False</font>, auth_token<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Sends a batch request to the server to execute operation entries.<br>
<br>
Args:<br>
feed: A batch feed containing batch entries, each is an operation.<br>
uri: (optional) The uri to which the batch request feed should be POSTed.<br>
If none is provided, then the feed's edit link will be used.<br>
force: (optional) boolean set to True if you want the batch update to<br>
clobber all data. If False, the version in the information in the<br>
feed object will cause the server to check to see that no changes<br>
intervened between when you fetched the data and when you sent the<br>
changes.<br>
auth_token: (optional) An object which sets the Authorization HTTP header<br>
in its modify_request method. Recommended classes include<br>
gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken<br>
among others.</tt></dd></dl>
<dl><dt><a name="DocsClient-client_login"><strong>client_login</strong></a>(self, email, password, source, service<font color="#909090">=None</font>, account_type<font color="#909090">='HOSTED_OR_GOOGLE'</font>, auth_url<font color="#909090">=<atom.http_core.Uri object></font>, captcha_token<font color="#909090">=None</font>, captcha_response<font color="#909090">=None</font>)</dt><dd><tt>Performs an auth request using the user's email address and password.<br>
<br>
In order to modify user specific data and read user private data, your<br>
application must be authorized by the user. One way to demonstrage<br>
authorization is by including a Client Login token in the Authorization<br>
HTTP header of all requests. This method requests the Client Login token<br>
by sending the user's email address, password, the name of the<br>
application, and the service code for the service which will be accessed<br>
by the application. If the username and password are correct, the server<br>
will respond with the client login code and a new ClientLoginToken<br>
object will be set in the client's auth_token member. With the auth_token<br>
set, future requests from this client will include the Client Login<br>
token.<br>
<br>
For a list of service names, see <br>
<a href="http://code.google.com/apis/gdata/faq.html#clientlogin">http://code.google.com/apis/gdata/faq.html#clientlogin</a><br>
For more information on Client Login, see:<br>
<a href="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html">http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html</a><br>
<br>
Args:<br>
email: str The user's email address or username.<br>
password: str The password for the user's account.<br>
source: str The name of your application. This can be anything you<br>
like but should should give some indication of which app is<br>
making the request.<br>
service: str The service code for the service you would like to access.<br>
For example, 'cp' for contacts, 'cl' for calendar. For a full<br>
list see<br>
<a href="http://code.google.com/apis/gdata/faq.html#clientlogin">http://code.google.com/apis/gdata/faq.html#clientlogin</a><br>
If you are using a subclass of the gdata.client.<a href="gdata.client.html#GDClient">GDClient</a>, the<br>
service will usually be filled in for you so you do not need<br>
to specify it. For example see BloggerClient,<br>
SpreadsheetsClient, etc.<br>
account_type: str (optional) The type of account which is being<br>
authenticated. This can be either 'GOOGLE' for a Google<br>
Account, 'HOSTED' for a Google Apps Account, or the<br>
default 'HOSTED_OR_GOOGLE' which will select the Google<br>
Apps Account if the same email address is used for both<br>
a Google Account and a Google Apps Account.<br>
auth_url: str (optional) The URL to which the login request should be<br>
sent.<br>
captcha_token: str (optional) If a previous login attempt was reponded<br>
to with a CAPTCHA challenge, this is the token which<br>
identifies the challenge (from the CAPTCHA's URL).<br>
captcha_response: str (optional) If a previous login attempt was<br>
reponded to with a CAPTCHA challenge, this is the<br>
response text which was contained in the challenge.<br>
<br>
Returns:<br>
Generated token, which is also stored in this object.<br>
<br>
Raises:<br>
A RequestError or one of its suclasses: BadAuthentication,<br>
BadAuthenticationServiceURL, ClientLoginFailed,<br>
ClientLoginTokenMissing, or CaptchaChallenge</tt></dd></dl>
<dl><dt><a name="DocsClient-delete"><strong>delete</strong></a>(self, entry_or_uri, auth_token<font color="#909090">=None</font>, force<font color="#909090">=False</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-get_access_token"><strong>get_access_token</strong></a>(self, request_token, url<font color="#909090">='https://www.google.com/accounts/OAuthGetAccessToken'</font>)</dt><dd><tt>Exchanges an authorized OAuth request token for an access token.<br>
<br>
Contacts the Google OAuth server to upgrade a previously authorized<br>
request token. Once the request token is upgraded to an access token,<br>
the access token may be used to access the user's data.<br>
<br>
For more details, see the Google Accounts OAuth documentation:<br>
<a href="http://code.google.com/apis/accounts/docs/OAuth.html#AccessToken">http://code.google.com/apis/accounts/docs/OAuth.html#AccessToken</a><br>
<br>
Args:<br>
request_token: An OAuth token which has been authorized by the user.<br>
url: (optional) The URL to which the upgrade request should be sent.<br>
Defaults to: https://www.google.com/accounts/OAuthAuthorizeToken</tt></dd></dl>
<dl><dt><a name="DocsClient-get_entry"><strong>get_entry</strong></a>(self, uri, auth_token<font color="#909090">=None</font>, converter<font color="#909090">=None</font>, desired_class<font color="#909090">=<class 'gdata.data.GDEntry'></font>, etag<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-get_feed"><strong>get_feed</strong></a>(self, uri, auth_token<font color="#909090">=None</font>, converter<font color="#909090">=None</font>, desired_class<font color="#909090">=<class 'gdata.data.GDFeed'></font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-get_next"><strong>get_next</strong></a>(self, feed, auth_token<font color="#909090">=None</font>, converter<font color="#909090">=None</font>, desired_class<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Fetches the next set of results from the feed.<br>
<br>
When requesting a feed, the number of entries returned is capped at a<br>
service specific default limit (often 25 entries). You can specify your<br>
own entry-count cap using the max-results URL query parameter. If there<br>
are more results than could fit under max-results, the feed will contain<br>
a next link. This method performs a GET against this next results URL.<br>
<br>
Returns:<br>
A new feed object containing the next set of entries in this feed.</tt></dd></dl>
<dl><dt><a name="DocsClient-get_oauth_token"><strong>get_oauth_token</strong></a>(self, scopes, next, consumer_key, consumer_secret<font color="#909090">=None</font>, rsa_private_key<font color="#909090">=None</font>, url<font color="#909090">='https://www.google.com/accounts/OAuthGetRequestToken'</font>)</dt><dd><tt>Obtains an OAuth request token to allow the user to authorize this app.<br>
<br>
Once this client has a request token, the user can authorize the request<br>
token by visiting the authorization URL in their browser. After being<br>
redirected back to this app at the 'next' URL, this app can then exchange<br>
the authorized request token for an access token.<br>
<br>
For more information see the documentation on Google Accounts with OAuth:<br>
<a href="http://code.google.com/apis/accounts/docs/OAuth.html#AuthProcess">http://code.google.com/apis/accounts/docs/OAuth.html#AuthProcess</a><br>
<br>
Args:<br>
scopes: list of strings or atom.http_core.Uri objects which specify the<br>
URL prefixes which this app will be accessing. For example, to access<br>
the Google Calendar API, you would want to use scopes:<br>
['https://www.google.com/calendar/feeds/',<br>
'<a href="http://www.google.com/calendar/feeds/">http://www.google.com/calendar/feeds/</a>']<br>
next: str or atom.http_core.Uri object, The URL which the user's browser<br>
should be sent to after they authorize access to their data. This<br>
should be a URL in your application which will read the token<br>
information from the URL and upgrade the request token to an access<br>
token.<br>
consumer_key: str This is the identifier for this application which you<br>
should have received when you registered your application with Google<br>
to use OAuth.<br>
consumer_secret: str (optional) The shared secret between your app and<br>
Google which provides evidence that this request is coming from you<br>
application and not another app. If present, this libraries assumes<br>
you want to use an HMAC signature to verify requests. Keep this data<br>
a secret.<br>
rsa_private_key: str (optional) The RSA private key which is used to<br>
generate a digital signature which is checked by Google's server. If<br>
present, this library assumes that you want to use an RSA signature<br>
to verify requests. Keep this data a secret.<br>
url: The URL to which a request for a token should be made. The default<br>
is Google's OAuth request token provider.</tt></dd></dl>
<dl><dt><a name="DocsClient-modify_request"><strong>modify_request</strong></a>(self, http_request)</dt><dd><tt>Adds or changes request before making the HTTP request.<br>
<br>
This client will add the API version if it is specified.<br>
Subclasses may override this method to add their own request<br>
modifications before the request is made.</tt></dd></dl>
<dl><dt><a name="DocsClient-post"><strong>post</strong></a>(self, entry, uri, auth_token<font color="#909090">=None</font>, converter<font color="#909090">=None</font>, desired_class<font color="#909090">=None</font>, **kwargs)</dt></dl>
<dl><dt><a name="DocsClient-request_client_login_token"><strong>request_client_login_token</strong></a>(self, email, password, source, service<font color="#909090">=None</font>, account_type<font color="#909090">='HOSTED_OR_GOOGLE'</font>, auth_url<font color="#909090">=<atom.http_core.Uri object></font>, captcha_token<font color="#909090">=None</font>, captcha_response<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="DocsClient-revoke_token"><strong>revoke_token</strong></a>(self, token<font color="#909090">=None</font>, url<font color="#909090">=<atom.http_core.Uri object></font>)</dt><dd><tt>Requests that the token be invalidated.<br>
<br>
This method can be used for both AuthSub and OAuth tokens (to invalidate<br>
a ClientLogin token, the user must change their password).<br>
<br>
Returns:<br>
True if the server responded with a 200.<br>
<br>
Raises:<br>
A RequestError if the server responds with a non-200 status.</tt></dd></dl>
<dl><dt><a name="DocsClient-update"><strong>update</strong></a>(self, entry, auth_token<font color="#909090">=None</font>, force<font color="#909090">=False</font>, uri<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Edits the entry on the server by sending the XML for this entry.<br>
<br>
Performs a PUT and converts the response to a new entry object with a<br>
matching class to the entry passed in.<br>
<br>
Args:<br>
entry:<br>
auth_token:<br>
force: boolean stating whether an update should be forced. Defaults to<br>
False. Normally, if a change has been made since the passed in<br>
entry was obtained, the server will not overwrite the entry since<br>
the changes were based on an obsolete version of the entry.<br>
Setting force to True will cause the update to silently<br>
overwrite whatever version is present.<br>
uri: The uri to put to. If provided, this uri is PUT to rather than the<br>
inferred uri from the entry's edit link.<br>
<br>
Returns:<br>
A new Entry object of a matching type to the entry which was passed in.</tt></dd></dl>
<dl><dt><a name="DocsClient-upgrade_token"><strong>upgrade_token</strong></a>(self, token<font color="#909090">=None</font>, url<font color="#909090">=<atom.http_core.Uri object></font>)</dt><dd><tt>Asks the Google auth server for a multi-use AuthSub token.<br>
<br>
For details on AuthSub, see:<br>
<a href="http://code.google.com/apis/accounts/docs/AuthSub.html">http://code.google.com/apis/accounts/docs/AuthSub.html</a><br>
<br>
Args:<br>
token: gdata.gauth.AuthSubToken or gdata.gauth.SecureAuthSubToken<br>
(optional) If no token is passed in, the client's auth_token member<br>
is used to request the new token. The token object will be modified<br>
to contain the new session token string.<br>
url: str or atom.http_core.Uri (optional) The URL to which the token<br>
upgrade request should be sent. Defaults to:<br>
https://www.google.com/accounts/AuthSubSessionToken<br>
<br>
Returns:<br>