@@ -111,8 +111,8 @@ def files_download(self,
111
111
Download a file from a user's Dropbox.
112
112
113
113
:param str path: The path of the file to download.
114
- :param Nullable rev: Deprecated. Please specify revision in
115
- :field:'path' instead
114
+ :param Nullable rev: Deprecated. Please specify revision in ``path``
115
+ instead
116
116
:rtype: (:class:`dropbox.files.FileMetadata`,
117
117
:class:`requests.models.Response`)
118
118
:raises: :class:`dropbox.exceptions.ApiError`
@@ -149,8 +149,8 @@ def files_download_to_file(self,
149
149
150
150
:param str download_path: Path on local machine to save file.
151
151
:param str path: The path of the file to download.
152
- :param Nullable rev: Deprecated. Please specify revision in
153
- :field:'path' instead
152
+ :param Nullable rev: Deprecated. Please specify revision in ``path``
153
+ instead
154
154
:rtype: (:class:`dropbox.files.FileMetadata`,
155
155
:class:`requests.models.Response`)
156
156
:raises: :class:`dropbox.exceptions.ApiError`
@@ -177,11 +177,12 @@ def files_get_metadata(self,
177
177
path ,
178
178
include_media_info = False ):
179
179
"""
180
- Returns the metadata for a file or folder.
180
+ Returns the metadata for a file or folder. Note: Metadata for the root
181
+ folder is unsupported.
181
182
182
- :param str path: The path of a file or folder on Dropbox
183
- :param bool include_media_info: If true,
184
- :field:'FileMetadata.media_info' is set for photo and video.
183
+ :param str path: The path of a file or folder on Dropbox.
184
+ :param bool include_media_info: If true, ``FileMetadata.media_info`` is
185
+ set for photo and video.
185
186
:rtype: :class:`dropbox.files.Metadata`
186
187
:raises: :class:`dropbox.exceptions.ApiError`
187
188
@@ -211,8 +212,8 @@ def files_get_preview(self,
211
212
.ppsx, .ppsm, .pptx, .pptm, .xls, .xlsx, .xlsm, .rtf
212
213
213
214
:param str path: The path of the file to preview.
214
- :param Nullable rev: Deprecated. Please specify revision in
215
- :field:'path' instead
215
+ :param Nullable rev: Deprecated. Please specify revision in ``path``
216
+ instead
216
217
:rtype: (:class:`dropbox.files.FileMetadata`,
217
218
:class:`requests.models.Response`)
218
219
:raises: :class:`dropbox.exceptions.ApiError`
@@ -251,8 +252,8 @@ def files_get_preview_to_file(self,
251
252
252
253
:param str download_path: Path on local machine to save file.
253
254
:param str path: The path of the file to preview.
254
- :param Nullable rev: Deprecated. Please specify revision in
255
- :field:'path' instead
255
+ :param Nullable rev: Deprecated. Please specify revision in ``path``
256
+ instead
256
257
:rtype: (:class:`dropbox.files.FileMetadata`,
257
258
:class:`requests.models.Response`)
258
259
:raises: :class:`dropbox.exceptions.ApiError`
@@ -374,8 +375,8 @@ def files_list_folder(self,
374
375
:param bool recursive: If true, the list folder operation will be
375
376
applied recursively to all subfolders and the response will contain
376
377
contents of all subfolders.
377
- :param bool include_media_info: If true,
378
- :field:'FileMetadata.media_info' is set for photo and video.
378
+ :param bool include_media_info: If true, ``FileMetadata.media_info`` is
379
+ set for photo and video.
379
380
:param bool include_deleted: If true, the results will include entries
380
381
for files and folders that used to exist but were deleted.
381
382
:rtype: :class:`dropbox.files.ListFolderResult`
@@ -443,8 +444,8 @@ def files_list_folder_get_latest_cursor(self,
443
444
:param bool recursive: If true, the list folder operation will be
444
445
applied recursively to all subfolders and the response will contain
445
446
contents of all subfolders.
446
- :param bool include_media_info: If true,
447
- :field:'FileMetadata.media_info' is set for photo and video.
447
+ :param bool include_media_info: If true, ``FileMetadata.media_info`` is
448
+ set for photo and video.
448
449
:param bool include_deleted: If true, the results will include entries
449
450
for files and folders that used to exist but were deleted.
450
451
:rtype: :class:`dropbox.files.ListFolderGetLatestCursorResult`
@@ -996,7 +997,8 @@ def sharing_get_folder_metadata(self,
996
997
and is subject to minor but possibly backwards-incompatible changes.
997
998
998
999
:param str shared_folder_id: The ID for the shared folder.
999
- :param Nullable actions: Folder actions to query.
1000
+ :param Nullable actions: Folder actions to query. This field is
1001
+ optional.
1000
1002
:rtype: :class:`dropbox.sharing.SharedFolderMetadata`
1001
1003
:raises: :class:`dropbox.exceptions.ApiError`
1002
1004
@@ -1163,22 +1165,27 @@ def sharing_get_shared_links(self,
1163
1165
1164
1166
def sharing_list_folder_members (self ,
1165
1167
shared_folder_id ,
1166
- actions = None ):
1168
+ actions = None ,
1169
+ limit = 1000 ):
1167
1170
"""
1168
1171
Returns shared folder membership by its folder ID. Apps must have full
1169
1172
Dropbox access to use this endpoint. Warning: This endpoint is in beta
1170
1173
and is subject to minor but possibly backwards-incompatible changes.
1171
1174
1172
1175
:param str shared_folder_id: The ID for the shared folder.
1173
- :param Nullable actions: Member actions to query.
1176
+ :param Nullable actions: Member actions to query. This field is
1177
+ optional.
1178
+ :param long limit: The maximum number of results that include members,
1179
+ groups and invitees to return per request.
1174
1180
:rtype: :class:`dropbox.sharing.SharedFolderMembers`
1175
1181
:raises: :class:`dropbox.exceptions.ApiError`
1176
1182
1177
1183
If this raises, ApiError.reason is of type:
1178
1184
:class:`dropbox.sharing.SharedFolderAccessError`
1179
1185
"""
1180
1186
arg = sharing .ListFolderMembersArgs (shared_folder_id ,
1181
- actions )
1187
+ actions ,
1188
+ limit )
1182
1189
r = self .request (
1183
1190
'api' ,
1184
1191
'sharing/list_folder_members' ,
@@ -1220,21 +1227,27 @@ def sharing_list_folder_members_continue(self,
1220
1227
)
1221
1228
return r
1222
1229
1223
- def sharing_list_folders (self ):
1230
+ def sharing_list_folders (self ,
1231
+ limit = 1000 ,
1232
+ actions = None ):
1224
1233
"""
1225
1234
Return the list of all shared folders the current user has access to.
1226
1235
Apps must have full Dropbox access to use this endpoint. Warning: This
1227
1236
endpoint is in beta and is subject to minor but possibly
1228
1237
backwards-incompatible changes.
1229
1238
1239
+ :param long limit: The maximum number of results to return per request.
1240
+ :param Nullable actions: Folder actions to query. This field is
1241
+ optional.
1230
1242
:rtype: :class:`dropbox.sharing.ListFoldersResult`
1231
1243
"""
1232
- arg = None
1244
+ arg = sharing .ListFoldersArgs (limit ,
1245
+ actions )
1233
1246
r = self .request (
1234
1247
'api' ,
1235
1248
'sharing/list_folders' ,
1236
1249
'rpc' ,
1237
- bv .Void ( ),
1250
+ bv .Struct ( sharing . ListFoldersArgs ),
1238
1251
bv .Struct (sharing .ListFoldersResult ),
1239
1252
bv .Void (),
1240
1253
arg ,
@@ -1271,27 +1284,85 @@ def sharing_list_folders_continue(self,
1271
1284
)
1272
1285
return r
1273
1286
1287
+ def sharing_list_mountable_folders (self ,
1288
+ limit = 1000 ,
1289
+ actions = None ):
1290
+ """
1291
+ Return the list of all shared folders the current user can mount or
1292
+ unmount. Apps must have full Dropbox access to use this endpoint.
1293
+
1294
+ :param long limit: The maximum number of results to return per request.
1295
+ :param Nullable actions: Folder actions to query. This field is
1296
+ optional.
1297
+ :rtype: :class:`dropbox.sharing.ListFoldersResult`
1298
+ """
1299
+ arg = sharing .ListFoldersArgs (limit ,
1300
+ actions )
1301
+ r = self .request (
1302
+ 'api' ,
1303
+ 'sharing/list_mountable_folders' ,
1304
+ 'rpc' ,
1305
+ bv .Struct (sharing .ListFoldersArgs ),
1306
+ bv .Struct (sharing .ListFoldersResult ),
1307
+ bv .Void (),
1308
+ arg ,
1309
+ None ,
1310
+ )
1311
+ return r
1312
+
1313
+ def sharing_list_mountable_folders_continue (self ,
1314
+ cursor ):
1315
+ """
1316
+ Once a cursor has been retrieved from :meth:`list_mountable_folders`,
1317
+ use this to paginate through all mountable shared folders. Apps must
1318
+ have full Dropbox access to use this endpoint.
1319
+
1320
+ :param str cursor: The cursor returned by your last call to
1321
+ :meth:`list_folders` or :meth:`list_folders_continue`.
1322
+ :rtype: :class:`dropbox.sharing.ListFoldersResult`
1323
+ :raises: :class:`dropbox.exceptions.ApiError`
1324
+
1325
+ If this raises, ApiError.reason is of type:
1326
+ :class:`dropbox.sharing.ListFoldersContinueError`
1327
+ """
1328
+ arg = sharing .ListFoldersContinueArg (cursor )
1329
+ r = self .request (
1330
+ 'api' ,
1331
+ 'sharing/list_mountable_folders/continue' ,
1332
+ 'rpc' ,
1333
+ bv .Struct (sharing .ListFoldersContinueArg ),
1334
+ bv .Struct (sharing .ListFoldersResult ),
1335
+ bv .Union (sharing .ListFoldersContinueError ),
1336
+ arg ,
1337
+ None ,
1338
+ )
1339
+ return r
1340
+
1274
1341
def sharing_list_shared_links (self ,
1275
1342
path = None ,
1276
- cursor = None ):
1343
+ cursor = None ,
1344
+ direct_only = None ):
1277
1345
"""
1278
1346
List shared links of this user. If no path is given or the path is
1279
1347
empty, returns a list of all shared links for the current user. If a
1280
1348
non-empty path is given, returns a list of all shared links that allow
1281
1349
access to the given path - direct links to the given path and links to
1282
- parent folders of the given path.
1350
+ parent folders of the given path. Links to parent folders can be
1351
+ suppressed by setting direct_only to true.
1283
1352
1284
1353
:param Nullable path: See :meth:`list_shared_links` description.
1285
1354
:param Nullable cursor: The cursor returned by your last call to
1286
1355
:meth:`list_shared_links`.
1356
+ :param Nullable direct_only: See :meth:`list_shared_links` description.
1287
1357
:rtype: :class:`dropbox.sharing.ListSharedLinksResult`
1288
1358
:raises: :class:`dropbox.exceptions.ApiError`
1289
1359
1290
1360
If this raises, ApiError.reason is of type:
1291
1361
:class:`dropbox.sharing.ListSharedLinksError`
1292
1362
"""
1293
1363
arg = sharing .ListSharedLinksArg (path ,
1294
- cursor )
1364
+ cursor ,
1365
+ direct_only )
1295
1366
r = self .request (
1296
1367
'api' ,
1297
1368
'sharing/list_shared_links' ,
0 commit comments