mirror of
https://github.com/uroni/urbackup-server-python-web-api-wrapper.git
synced 2025-10-26 11:38:16 +00:00
add download function
This commit is contained in:
parent
53ff561ed2
commit
144b273f49
@ -460,6 +460,22 @@ class urbackup_server:
|
||||
|
||||
return content["files"]
|
||||
|
||||
def download_backup_file(self, clientid, backupid, path="/"):
|
||||
if not self.login():
|
||||
return None
|
||||
|
||||
response = self._get_response("backups", {
|
||||
"sa": "filesdl",
|
||||
"clientid": clientid,
|
||||
"backupid": backupid,
|
||||
"path": path
|
||||
}, "GET")
|
||||
|
||||
if response.status != 200:
|
||||
return None
|
||||
|
||||
return response
|
||||
|
||||
def get_groups(self):
|
||||
if not self.login():
|
||||
return None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user