Update delete endpoints to return True if successful.
If the operation isn't successful, the API returns an error code, which raises an OpenPhotoError exception.
This commit is contained in:
parent
306c8430ba
commit
e09f166743
7 changed files with 60 additions and 24 deletions
|
@ -20,10 +20,14 @@ class ApiTag:
|
|||
return Tag(self._client, result)
|
||||
|
||||
def delete(self, tag, **kwds):
|
||||
""" Delete a tag """
|
||||
"""
|
||||
Delete a tag.
|
||||
Returns True if successful.
|
||||
Raises an OpenPhotoError if not.
|
||||
"""
|
||||
if not isinstance(tag, Tag):
|
||||
tag = Tag(self._client, {"id": tag})
|
||||
tag.delete(**kwds)
|
||||
return tag.delete(**kwds)
|
||||
|
||||
def update(self, tag, **kwds):
|
||||
""" Update a tag """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue