@@ -159,7 +159,7 @@ def move(self, parent_folder):
159159 }
160160 return self .update_info (data )
161161
162- def get_shared_link (self , access = None , etag = None , unshared_at = None , allow_download = None , allow_preview = None ):
162+ def get_shared_link (self , access = None , etag = None , unshared_at = None , password = None , allow_download = None , allow_preview = None ):
163163 """Get a shared link for the item with the given access permissions.
164164
165165 :param access:
@@ -176,6 +176,10 @@ def get_shared_link(self, access=None, etag=None, unshared_at=None, allow_downlo
176176 and has permission to set expiration dates.
177177 :type unshared_at:
178178 :class:`datetime.date` or None
179+ :param password:
180+ The password required to view this link. If no password is specified, the default password will be used.
181+ :type password:
182+ `unicode` or None
179183 :param allow_download:
180184 Whether or not the item being shared can be downloaded when accessed via the shared link.
181185 If this parameter is None, the default setting will be used.
@@ -201,6 +205,9 @@ def get_shared_link(self, access=None, etag=None, unshared_at=None, allow_downlo
201205 if unshared_at is not None :
202206 data ['shared_link' ]['unshared_at' ] = unshared_at .isoformat ()
203207
208+ if password is not None :
209+ data ['shared_link' ]['password' ] = password
210+
204211 if allow_download is not None or allow_preview is not None :
205212 data ['shared_link' ]['permissions' ] = permissions = {}
206213 if allow_download is not None :
0 commit comments