Add photo.transform support and testcase.
This commit is contained in:
parent
b900b2abd3
commit
4147029b14
3 changed files with 38 additions and 6 deletions
|
@ -89,4 +89,13 @@ class ApiPhoto:
|
|||
return photo.next_previous(**kwds)
|
||||
|
||||
def transform(self, photo, **kwds):
|
||||
raise NotImplementedError()
|
||||
"""
|
||||
Performs transformation specified in **kwds
|
||||
Example: transform(photo, rotate=90)
|
||||
"""
|
||||
if not isinstance(photo, Photo):
|
||||
photo = Photo(self._client, {"id": photo})
|
||||
photo.transform(**kwds)
|
||||
# The API doesn't currently return the transformed photo
|
||||
# Uncomment the below once frontend issue #955 is resolved
|
||||
# return photo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue