@@ -139,8 +139,8 @@ def file_properties_properties_remove(self,
139
139
path ,
140
140
property_template_ids ):
141
141
"""
142
- Remove the specified property group from the file. To remove specific
143
- property field key value pairs, see
142
+ Permanently removes the specified property group from the file. To
143
+ remove specific property field key value pairs, see
144
144
:meth:`file_properties_properties_update`. To update a template, see
145
145
:meth:`file_properties_templates_update_for_user` or
146
146
:meth:`file_properties_templates_update_for_team`. Templates can't be
@@ -192,6 +192,31 @@ def file_properties_properties_search(self,
192
192
)
193
193
return r
194
194
195
+ def file_properties_properties_search_continue (self ,
196
+ cursor ):
197
+ """
198
+ Once a cursor has been retrieved from
199
+ :meth:`file_properties_properties_search`, use this to paginate through
200
+ all search results.
201
+
202
+ :param str cursor: The cursor returned by your last call to
203
+ :meth:`file_properties_properties_search` or
204
+ :meth:`file_properties_properties_search_continue`.
205
+ :rtype: :class:`dropbox.file_properties.PropertiesSearchResult`
206
+ :raises: :class:`dropbox.exceptions.ApiError`
207
+
208
+ If this raises, ApiError.reason is of type:
209
+ :class:`dropbox.file_properties.PropertiesSearchContinueError`
210
+ """
211
+ arg = file_properties .PropertiesSearchContinueArg (cursor )
212
+ r = self .request (
213
+ file_properties .properties_search_continue ,
214
+ 'file_properties' ,
215
+ arg ,
216
+ None ,
217
+ )
218
+ return r
219
+
195
220
def file_properties_properties_update (self ,
196
221
path ,
197
222
update_property_groups ):
@@ -230,7 +255,7 @@ def file_properties_templates_add_for_team(self,
230
255
"""
231
256
Add a template associated with a team. See
232
257
:meth:`file_properties_properties_add` to add properties to a file or
233
- folder.
258
+ folder. Note: this endpoint will create team-owned templates.
234
259
235
260
:rtype: :class:`dropbox.file_properties.AddTemplateResult`
236
261
:raises: :class:`dropbox.exceptions.ApiError`
@@ -363,6 +388,58 @@ def file_properties_templates_list_for_user(self):
363
388
)
364
389
return r
365
390
391
+ def file_properties_templates_remove_for_team (self ,
392
+ template_id ):
393
+ """
394
+ Permanently removes the specified template created from
395
+ :meth:`file_properties_templates_add_for_user`. All properties
396
+ associated with the template will also be removed. This action cannot be
397
+ undone.
398
+
399
+ :param str template_id: An identifier for a template created by
400
+ :meth:`file_properties_templates_add_for_user` or
401
+ :meth:`file_properties_templates_add_for_team`.
402
+ :rtype: None
403
+ :raises: :class:`dropbox.exceptions.ApiError`
404
+
405
+ If this raises, ApiError.reason is of type:
406
+ :class:`dropbox.file_properties.TemplateError`
407
+ """
408
+ arg = file_properties .RemoveTemplateArg (template_id )
409
+ r = self .request (
410
+ file_properties .templates_remove_for_team ,
411
+ 'file_properties' ,
412
+ arg ,
413
+ None ,
414
+ )
415
+ return None
416
+
417
+ def file_properties_templates_remove_for_user (self ,
418
+ template_id ):
419
+ """
420
+ Permanently removes the specified template created from
421
+ :meth:`file_properties_templates_add_for_user`. All properties
422
+ associated with the template will also be removed. This action cannot be
423
+ undone.
424
+
425
+ :param str template_id: An identifier for a template created by
426
+ :meth:`file_properties_templates_add_for_user` or
427
+ :meth:`file_properties_templates_add_for_team`.
428
+ :rtype: None
429
+ :raises: :class:`dropbox.exceptions.ApiError`
430
+
431
+ If this raises, ApiError.reason is of type:
432
+ :class:`dropbox.file_properties.TemplateError`
433
+ """
434
+ arg = file_properties .RemoveTemplateArg (template_id )
435
+ r = self .request (
436
+ file_properties .templates_remove_for_user ,
437
+ 'file_properties' ,
438
+ arg ,
439
+ None ,
440
+ )
441
+ return None
442
+
366
443
def file_properties_templates_update_for_team (self ,
367
444
template_id ,
368
445
name = None ,
@@ -554,6 +631,7 @@ def files_alpha_get_metadata(self,
554
631
include_media_info = False ,
555
632
include_deleted = False ,
556
633
include_has_explicit_shared_members = False ,
634
+ include_property_groups = None ,
557
635
include_property_templates = None ):
558
636
"""
559
637
Returns the metadata for a file or folder. This is an alpha endpoint
@@ -569,10 +647,15 @@ def files_alpha_get_metadata(self,
569
647
If this raises, ApiError.reason is of type:
570
648
:class:`dropbox.files.AlphaGetMetadataError`
571
649
"""
650
+ warnings .warn (
651
+ 'alpha/get_metadata is deprecated. Use get_metadata.' ,
652
+ DeprecationWarning ,
653
+ )
572
654
arg = files .AlphaGetMetadataArg (path ,
573
655
include_media_info ,
574
656
include_deleted ,
575
657
include_has_explicit_shared_members ,
658
+ include_property_groups ,
576
659
include_property_templates )
577
660
r = self .request (
578
661
files .alpha_get_metadata ,
@@ -598,14 +681,16 @@ def files_alpha_upload(self,
598
681
:meth:`files_upload_session_start`.
599
682
600
683
:param bytes f: Contents to upload.
601
- :param Nullable property_groups: List of custom properties to add to
602
- file.
603
684
:rtype: :class:`dropbox.files.FileMetadata`
604
685
:raises: :class:`dropbox.exceptions.ApiError`
605
686
606
687
If this raises, ApiError.reason is of type:
607
688
:class:`dropbox.files.UploadErrorWithProperties`
608
689
"""
690
+ warnings .warn (
691
+ 'alpha/upload is deprecated. Use alpha/upload.' ,
692
+ DeprecationWarning ,
693
+ )
609
694
arg = files .CommitInfoWithProperties (path ,
610
695
mode ,
611
696
autorename ,
@@ -1032,7 +1117,8 @@ def files_get_metadata(self,
1032
1117
path ,
1033
1118
include_media_info = False ,
1034
1119
include_deleted = False ,
1035
- include_has_explicit_shared_members = False ):
1120
+ include_has_explicit_shared_members = False ,
1121
+ include_property_groups = None ):
1036
1122
"""
1037
1123
Returns the metadata for a file or folder. Note: Metadata for the root
1038
1124
folder is unsupported.
@@ -1047,6 +1133,10 @@ def files_get_metadata(self,
1047
1133
:param bool include_has_explicit_shared_members: If true, the results
1048
1134
will include a flag for each file indicating whether or not that
1049
1135
file has any explicit members.
1136
+ :param Nullable include_property_groups: If set to a valid list of
1137
+ template IDs, ``FileMetadata.property_groups`` is set if there
1138
+ exists property data associated with the file and each of the listed
1139
+ templates.
1050
1140
:rtype: :class:`dropbox.files.Metadata`
1051
1141
:raises: :class:`dropbox.exceptions.ApiError`
1052
1142
@@ -1056,7 +1146,8 @@ def files_get_metadata(self,
1056
1146
arg = files .GetMetadataArg (path ,
1057
1147
include_media_info ,
1058
1148
include_deleted ,
1059
- include_has_explicit_shared_members )
1149
+ include_has_explicit_shared_members ,
1150
+ include_property_groups )
1060
1151
r = self .request (
1061
1152
files .get_metadata ,
1062
1153
'files' ,
@@ -1266,7 +1357,8 @@ def files_list_folder(self,
1266
1357
include_has_explicit_shared_members = False ,
1267
1358
include_mounted_folders = True ,
1268
1359
limit = None ,
1269
- shared_link = None ):
1360
+ shared_link = None ,
1361
+ include_property_groups = None ):
1270
1362
"""
1271
1363
Starts returning the contents of a folder. If the result's
1272
1364
``ListFolderResult.has_more`` field is ``True``, call
@@ -1315,6 +1407,10 @@ def files_list_folder(self,
1315
1407
this field is present, ``ListFolderArg.path`` will be relative to
1316
1408
root of the shared link. Only non-recursive mode is supported for
1317
1409
shared link.
1410
+ :param Nullable include_property_groups: If set to a valid list of
1411
+ template IDs, ``FileMetadata.property_groups`` is set if there
1412
+ exists property data associated with the file and each of the listed
1413
+ templates.
1318
1414
:rtype: :class:`dropbox.files.ListFolderResult`
1319
1415
:raises: :class:`dropbox.exceptions.ApiError`
1320
1416
@@ -1328,7 +1424,8 @@ def files_list_folder(self,
1328
1424
include_has_explicit_shared_members ,
1329
1425
include_mounted_folders ,
1330
1426
limit ,
1331
- shared_link )
1427
+ shared_link ,
1428
+ include_property_groups )
1332
1429
r = self .request (
1333
1430
files .list_folder ,
1334
1431
'files' ,
@@ -1369,7 +1466,8 @@ def files_list_folder_get_latest_cursor(self,
1369
1466
include_has_explicit_shared_members = False ,
1370
1467
include_mounted_folders = True ,
1371
1468
limit = None ,
1372
- shared_link = None ):
1469
+ shared_link = None ,
1470
+ include_property_groups = None ):
1373
1471
"""
1374
1472
A way to quickly get a cursor for the folder's state. Unlike
1375
1473
:meth:`files_list_folder`, :meth:`files_list_folder_get_latest_cursor`
@@ -1399,6 +1497,10 @@ def files_list_folder_get_latest_cursor(self,
1399
1497
this field is present, ``ListFolderArg.path`` will be relative to
1400
1498
root of the shared link. Only non-recursive mode is supported for
1401
1499
shared link.
1500
+ :param Nullable include_property_groups: If set to a valid list of
1501
+ template IDs, ``FileMetadata.property_groups`` is set if there
1502
+ exists property data associated with the file and each of the listed
1503
+ templates.
1402
1504
:rtype: :class:`dropbox.files.ListFolderGetLatestCursorResult`
1403
1505
:raises: :class:`dropbox.exceptions.ApiError`
1404
1506
@@ -1412,7 +1514,8 @@ def files_list_folder_get_latest_cursor(self,
1412
1514
include_has_explicit_shared_members ,
1413
1515
include_mounted_folders ,
1414
1516
limit ,
1415
- shared_link )
1517
+ shared_link ,
1518
+ include_property_groups )
1416
1519
r = self .request (
1417
1520
files .list_folder_get_latest_cursor ,
1418
1521
'files' ,
@@ -1928,7 +2031,8 @@ def files_upload(self,
1928
2031
mode = files .WriteMode .add ,
1929
2032
autorename = False ,
1930
2033
client_modified = None ,
1931
- mute = False ):
2034
+ mute = False ,
2035
+ property_groups = None ):
1932
2036
"""
1933
2037
Create a new file with the contents provided in the request. Do not use
1934
2038
this to upload a file larger than 150 MB. Instead, create an upload
@@ -1951,6 +2055,8 @@ def files_upload(self,
1951
2055
modifications in their Dropbox account via notifications in the
1952
2056
client software. If ``True``, this tells the clients that this
1953
2057
modification shouldn't result in a user notification.
2058
+ :param Nullable property_groups: List of custom properties to add to
2059
+ file.
1954
2060
:rtype: :class:`dropbox.files.FileMetadata`
1955
2061
:raises: :class:`dropbox.exceptions.ApiError`
1956
2062
@@ -1961,7 +2067,8 @@ def files_upload(self,
1961
2067
mode ,
1962
2068
autorename ,
1963
2069
client_modified ,
1964
- mute )
2070
+ mute ,
2071
+ property_groups )
1965
2072
r = self .request (
1966
2073
files .upload ,
1967
2074
'files' ,
0 commit comments