@@ -1299,6 +1299,59 @@ def getArchivefile(self, filters: dict = None, allPages: bool = False):
12991299 """ # noqa: E501
13001300 return self .archive .getArchivefile (filters , allPages )
13011301
1302+ def getArchivefileUrls (
1303+ self ,
1304+ filters : dict = None ,
1305+ allPages : bool = False ,
1306+ joinedWithNewline : bool = False ,
1307+ ) -> list [str ] | str :
1308+ """
1309+ Return a list of file URLs (or joined with a newline) available in Oceans 3.0 Archiving System by given query parameters.
1310+
1311+ A helper method for getting a list of archive files URLs without downloading them.
1312+ It can also return a single string that concatenates all the URLs in the list together with a newline,
1313+ which can be useful if you are using a download manager and it supports batch downloading multiple URLs
1314+ that expects all the URLs on a separate line from either a file or the clipboard.
1315+
1316+ Parameters
1317+ ----------
1318+ filters : dict, optional
1319+ Query string parameters in the API request.
1320+ See ``getArchivefileByLocation`` and ``getArchivefileByDevice`` for more information.
1321+ allPages : bool, default False
1322+ Whether the response concatenates data on all pages if there are more than one page due to rowLimit.
1323+ joinedWithNewline: bool, default False
1324+ Whether it returns a list of URLs or a single string that concatenates the list with a newline.
1325+
1326+ Returns
1327+ -------
1328+ list[str] | str
1329+ A list of file URLs or a single joined string.
1330+ """ # noqa: E501
1331+ file_urls = self .archive .getArchivefileUrls (filters , allPages )
1332+ if joinedWithNewline :
1333+ return "\n " .join (file_urls )
1334+ else :
1335+ return file_urls
1336+
1337+ def getArchivefileUrl (self , filename : str = "" ) -> str :
1338+ """
1339+ Return a file URL from Oceans 3.0 Archiving System by specifying the file name.
1340+
1341+ A helper method for obtaining the archive file URL without actually downloading the file.
1342+
1343+ Parameters
1344+ ----------
1345+ filename : str, default ""
1346+ A valid name of a file in DMAS Archiving System.
1347+
1348+ Returns
1349+ -------
1350+ str:
1351+ A download URL for the given archive filename.
1352+ """ # noqa: E501
1353+ return self .archive .getArchivefileUrl (filename )
1354+
13021355 def downloadArchivefile (self , filename : str = "" , overwrite : bool = False ):
13031356 """
13041357 Download a file from Oceans 3.0 Archiving System by specifying the file name.
0 commit comments