Skip to content

Commit

Permalink
Automated Spec Update (#394)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
DropboxBot and DropboxBot authored Nov 3, 2021
1 parent 0f71807 commit 0eddf8b
Show file tree
Hide file tree
Showing 3 changed files with 601 additions and 3 deletions.
70 changes: 70 additions & 0 deletions dropbox/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2775,6 +2775,76 @@ def files_search_continue_v2(self,
)
return r

def files_tags_add(self,
path,
tag_text):
"""
Add a tag to an item. A tag is a string. No more than 20 tags can be
added to a given item.
:param str path: Path to the item to be tagged.
:param str tag_text: The value of the tag to add.
:rtype: None
:raises: :class:`.exceptions.ApiError`
If this raises, ApiError will contain:
:class:`dropbox.files.AddTagError`
"""
arg = files.AddTagArg(path,
tag_text)
r = self.request(
files.tags_add,
'files',
arg,
None,
)
return None

def files_tags_get(self,
paths):
"""
Get list of tags assigned to items.
:param List[str] paths: Path to the items.
:rtype: :class:`dropbox.files.GetTagsResult`
:raises: :class:`.exceptions.ApiError`
If this raises, ApiError will contain:
:class:`dropbox.files.BaseTagError`
"""
arg = files.GetTagsArg(paths)
r = self.request(
files.tags_get,
'files',
arg,
None,
)
return r

def files_tags_remove(self,
path,
tag_text):
"""
Remove a tag from an item.
:param str path: Path to the item to tag.
:param str tag_text: The tag to remove.
:rtype: None
:raises: :class:`.exceptions.ApiError`
If this raises, ApiError will contain:
:class:`dropbox.files.RemoveTagError`
"""
arg = files.RemoveTagArg(path,
tag_text)
r = self.request(
files.tags_remove,
'files',
arg,
None,
)
return None

def files_unlock_file_batch(self,
entries):
"""
Expand Down
Loading

0 comments on commit 0eddf8b

Please sign in to comment.