@@ -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 , allow_download = None , allow_preview = None , password = None ):
163163 """Get a shared link for the item with the given access permissions.
164164
165165 :param access:
@@ -186,6 +186,11 @@ def get_shared_link(self, access=None, etag=None, unshared_at=None, allow_downlo
186186 If this parameter is None, the default setting will be used.
187187 :type allow_preview:
188188 `bool` or None
189+ :param password:
190+ The password required to view this link. If no password is specified then no password will be set.
191+ Please notice that this is a premium feature, which might not be available to your app.
192+ :type password:
193+ `unicode` or None
189194 :returns:
190195 The URL of the shared link.
191196 :rtype:
@@ -208,6 +213,9 @@ def get_shared_link(self, access=None, etag=None, unshared_at=None, allow_downlo
208213 if allow_preview is not None :
209214 permissions ['can_preview' ] = allow_preview
210215
216+ if password is not None :
217+ data ['shared_link' ]['password' ] = password
218+
211219 item = self .update_info (data , etag = etag )
212220 return item .shared_link ['url' ]
213221
0 commit comments