@@ -139,8 +139,8 @@ def file_properties_properties_remove(self,
139139 path ,
140140 property_template_ids ):
141141 """
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
144144 :meth:`file_properties_properties_update`. To update a template, see
145145 :meth:`file_properties_templates_update_for_user` or
146146 :meth:`file_properties_templates_update_for_team`. Templates can't be
@@ -192,6 +192,31 @@ def file_properties_properties_search(self,
192192 )
193193 return r
194194
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+
195220 def file_properties_properties_update (self ,
196221 path ,
197222 update_property_groups ):
@@ -230,7 +255,7 @@ def file_properties_templates_add_for_team(self,
230255 """
231256 Add a template associated with a team. See
232257 :meth:`file_properties_properties_add` to add properties to a file or
233- folder.
258+ folder. Note: this endpoint will create team-owned templates.
234259
235260 :rtype: :class:`dropbox.file_properties.AddTemplateResult`
236261 :raises: :class:`dropbox.exceptions.ApiError`
@@ -363,6 +388,58 @@ def file_properties_templates_list_for_user(self):
363388 )
364389 return r
365390
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+
366443 def file_properties_templates_update_for_team (self ,
367444 template_id ,
368445 name = None ,
@@ -554,6 +631,7 @@ def files_alpha_get_metadata(self,
554631 include_media_info = False ,
555632 include_deleted = False ,
556633 include_has_explicit_shared_members = False ,
634+ include_property_groups = None ,
557635 include_property_templates = None ):
558636 """
559637 Returns the metadata for a file or folder. This is an alpha endpoint
@@ -569,10 +647,15 @@ def files_alpha_get_metadata(self,
569647 If this raises, ApiError.reason is of type:
570648 :class:`dropbox.files.AlphaGetMetadataError`
571649 """
650+ warnings .warn (
651+ 'alpha/get_metadata is deprecated. Use get_metadata.' ,
652+ DeprecationWarning ,
653+ )
572654 arg = files .AlphaGetMetadataArg (path ,
573655 include_media_info ,
574656 include_deleted ,
575657 include_has_explicit_shared_members ,
658+ include_property_groups ,
576659 include_property_templates )
577660 r = self .request (
578661 files .alpha_get_metadata ,
@@ -598,14 +681,16 @@ def files_alpha_upload(self,
598681 :meth:`files_upload_session_start`.
599682
600683 :param bytes f: Contents to upload.
601- :param Nullable property_groups: List of custom properties to add to
602- file.
603684 :rtype: :class:`dropbox.files.FileMetadata`
604685 :raises: :class:`dropbox.exceptions.ApiError`
605686
606687 If this raises, ApiError.reason is of type:
607688 :class:`dropbox.files.UploadErrorWithProperties`
608689 """
690+ warnings .warn (
691+ 'alpha/upload is deprecated. Use alpha/upload.' ,
692+ DeprecationWarning ,
693+ )
609694 arg = files .CommitInfoWithProperties (path ,
610695 mode ,
611696 autorename ,
@@ -1032,7 +1117,8 @@ def files_get_metadata(self,
10321117 path ,
10331118 include_media_info = False ,
10341119 include_deleted = False ,
1035- include_has_explicit_shared_members = False ):
1120+ include_has_explicit_shared_members = False ,
1121+ include_property_groups = None ):
10361122 """
10371123 Returns the metadata for a file or folder. Note: Metadata for the root
10381124 folder is unsupported.
@@ -1047,6 +1133,10 @@ def files_get_metadata(self,
10471133 :param bool include_has_explicit_shared_members: If true, the results
10481134 will include a flag for each file indicating whether or not that
10491135 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.
10501140 :rtype: :class:`dropbox.files.Metadata`
10511141 :raises: :class:`dropbox.exceptions.ApiError`
10521142
@@ -1056,7 +1146,8 @@ def files_get_metadata(self,
10561146 arg = files .GetMetadataArg (path ,
10571147 include_media_info ,
10581148 include_deleted ,
1059- include_has_explicit_shared_members )
1149+ include_has_explicit_shared_members ,
1150+ include_property_groups )
10601151 r = self .request (
10611152 files .get_metadata ,
10621153 'files' ,
@@ -1266,7 +1357,8 @@ def files_list_folder(self,
12661357 include_has_explicit_shared_members = False ,
12671358 include_mounted_folders = True ,
12681359 limit = None ,
1269- shared_link = None ):
1360+ shared_link = None ,
1361+ include_property_groups = None ):
12701362 """
12711363 Starts returning the contents of a folder. If the result's
12721364 ``ListFolderResult.has_more`` field is ``True``, call
@@ -1315,6 +1407,10 @@ def files_list_folder(self,
13151407 this field is present, ``ListFolderArg.path`` will be relative to
13161408 root of the shared link. Only non-recursive mode is supported for
13171409 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.
13181414 :rtype: :class:`dropbox.files.ListFolderResult`
13191415 :raises: :class:`dropbox.exceptions.ApiError`
13201416
@@ -1328,7 +1424,8 @@ def files_list_folder(self,
13281424 include_has_explicit_shared_members ,
13291425 include_mounted_folders ,
13301426 limit ,
1331- shared_link )
1427+ shared_link ,
1428+ include_property_groups )
13321429 r = self .request (
13331430 files .list_folder ,
13341431 'files' ,
@@ -1369,7 +1466,8 @@ def files_list_folder_get_latest_cursor(self,
13691466 include_has_explicit_shared_members = False ,
13701467 include_mounted_folders = True ,
13711468 limit = None ,
1372- shared_link = None ):
1469+ shared_link = None ,
1470+ include_property_groups = None ):
13731471 """
13741472 A way to quickly get a cursor for the folder's state. Unlike
13751473 :meth:`files_list_folder`, :meth:`files_list_folder_get_latest_cursor`
@@ -1399,6 +1497,10 @@ def files_list_folder_get_latest_cursor(self,
13991497 this field is present, ``ListFolderArg.path`` will be relative to
14001498 root of the shared link. Only non-recursive mode is supported for
14011499 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.
14021504 :rtype: :class:`dropbox.files.ListFolderGetLatestCursorResult`
14031505 :raises: :class:`dropbox.exceptions.ApiError`
14041506
@@ -1412,7 +1514,8 @@ def files_list_folder_get_latest_cursor(self,
14121514 include_has_explicit_shared_members ,
14131515 include_mounted_folders ,
14141516 limit ,
1415- shared_link )
1517+ shared_link ,
1518+ include_property_groups )
14161519 r = self .request (
14171520 files .list_folder_get_latest_cursor ,
14181521 'files' ,
@@ -1928,7 +2031,8 @@ def files_upload(self,
19282031 mode = files .WriteMode .add ,
19292032 autorename = False ,
19302033 client_modified = None ,
1931- mute = False ):
2034+ mute = False ,
2035+ property_groups = None ):
19322036 """
19332037 Create a new file with the contents provided in the request. Do not use
19342038 this to upload a file larger than 150 MB. Instead, create an upload
@@ -1951,6 +2055,8 @@ def files_upload(self,
19512055 modifications in their Dropbox account via notifications in the
19522056 client software. If ``True``, this tells the clients that this
19532057 modification shouldn't result in a user notification.
2058+ :param Nullable property_groups: List of custom properties to add to
2059+ file.
19542060 :rtype: :class:`dropbox.files.FileMetadata`
19552061 :raises: :class:`dropbox.exceptions.ApiError`
19562062
@@ -1961,7 +2067,8 @@ def files_upload(self,
19612067 mode ,
19622068 autorename ,
19632069 client_modified ,
1964- mute )
2070+ mute ,
2071+ property_groups )
19652072 r = self .request (
19662073 files .upload ,
19672074 'files' ,
0 commit comments