diff --git a/h51/resources.py b/h51/resources.py index 67780eb..dcb9603 100644 --- a/h51/resources.py +++ b/h51/resources.py @@ -150,12 +150,13 @@ def persist(self): self._document.update(r) - def shallow_copy(self): + def shallow_copy(self, copies=1): """Shallow copy an asset (remove the expires time)""" r = self._client( 'post', - f'assets/{self.uid}/shallow-copy' + f'assets/{self.uid}/shallow-copy', + data={'copies': copies} ) @classmethod @@ -314,7 +315,7 @@ def persist_many(cls, client, uids): ) @classmethod - def shallow_copy_many(cls, client, uids): + def shallow_copy_many(cls, client, uids, copies=1): """ Find one or more assets matching the given uids and shallow copy them (remove the expires time). @@ -322,7 +323,10 @@ def shallow_copy_many(cls, client, uids): return client( 'post', 'assets/shallow-copy', - data={'uids': uids} + data={ + 'copies': copies, + 'uids': uids + } ) @classmethod diff --git a/setup.py b/setup.py index 6dca1d2..f924700 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version='0.0.9', + version='0.0.10', description=\ 'The H51 Python library provides a pythonic interface to the H51 API.', long_description=long_description,