Add photo.transform support and testcase.
This commit is contained in:
parent
b900b2abd3
commit
4147029b14
3 changed files with 38 additions and 6 deletions
|
@ -85,8 +85,15 @@ class Photo(OpenPhotoObject):
|
|||
return value
|
||||
|
||||
def transform(self, **kwds):
|
||||
raise NotImplementedError()
|
||||
|
||||
"""
|
||||
Performs transformation specified in **kwds
|
||||
Example: transform(rotate=90)
|
||||
"""
|
||||
new_dict = self._openphoto.post("/photo/%s/transform.json" % self.id,
|
||||
**kwds)["result"]
|
||||
# The API doesn't currently return the transformed photo
|
||||
# Uncomment the below once frontend issue #955 is resolved
|
||||
# self._replace_fields(new_dict)
|
||||
|
||||
class Tag(OpenPhotoObject):
|
||||
def delete(self, **kwds):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue