Skip to content

Commit 0eddf8b

Browse files
authored
Automated Spec Update (dropbox#394)
6e0a08f15d3f28359208e079656780789361a95f Change Notes: files Namespace - Update list_folder route to include app auth - Update list_folder/continue route to include app auth - Update Examples Add file_tagging Namespace Co-authored-by: DropboxBot <DropboxBot@users.noreply.github.com>
1 parent 0f71807 commit 0eddf8b

File tree

3 files changed

+601
-3
lines changed

3 files changed

+601
-3
lines changed

dropbox/base.py

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2775,6 +2775,76 @@ def files_search_continue_v2(self,
27752775
)
27762776
return r
27772777

2778+
def files_tags_add(self,
2779+
path,
2780+
tag_text):
2781+
"""
2782+
Add a tag to an item. A tag is a string. No more than 20 tags can be
2783+
added to a given item.
2784+
2785+
:param str path: Path to the item to be tagged.
2786+
:param str tag_text: The value of the tag to add.
2787+
:rtype: None
2788+
:raises: :class:`.exceptions.ApiError`
2789+
2790+
If this raises, ApiError will contain:
2791+
:class:`dropbox.files.AddTagError`
2792+
"""
2793+
arg = files.AddTagArg(path,
2794+
tag_text)
2795+
r = self.request(
2796+
files.tags_add,
2797+
'files',
2798+
arg,
2799+
None,
2800+
)
2801+
return None
2802+
2803+
def files_tags_get(self,
2804+
paths):
2805+
"""
2806+
Get list of tags assigned to items.
2807+
2808+
:param List[str] paths: Path to the items.
2809+
:rtype: :class:`dropbox.files.GetTagsResult`
2810+
:raises: :class:`.exceptions.ApiError`
2811+
2812+
If this raises, ApiError will contain:
2813+
:class:`dropbox.files.BaseTagError`
2814+
"""
2815+
arg = files.GetTagsArg(paths)
2816+
r = self.request(
2817+
files.tags_get,
2818+
'files',
2819+
arg,
2820+
None,
2821+
)
2822+
return r
2823+
2824+
def files_tags_remove(self,
2825+
path,
2826+
tag_text):
2827+
"""
2828+
Remove a tag from an item.
2829+
2830+
:param str path: Path to the item to tag.
2831+
:param str tag_text: The tag to remove.
2832+
:rtype: None
2833+
:raises: :class:`.exceptions.ApiError`
2834+
2835+
If this raises, ApiError will contain:
2836+
:class:`dropbox.files.RemoveTagError`
2837+
"""
2838+
arg = files.RemoveTagArg(path,
2839+
tag_text)
2840+
r = self.request(
2841+
files.tags_remove,
2842+
'files',
2843+
arg,
2844+
None,
2845+
)
2846+
return None
2847+
27782848
def files_unlock_file_batch(self,
27792849
entries):
27802850
"""

0 commit comments

Comments
 (0)