From fdea77fce0291d8c24a0fcf4dd353d81e5a5b790 Mon Sep 17 00:00:00 2001 From: Jacob Timmerman <75219092+Jacobtims@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:12:29 +0200 Subject: [PATCH] Add days paramater to generate_backup method (#232) --- src/Client.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 80bee7f..914cea7 100755 --- a/src/Client.php +++ b/src/Client.php @@ -1557,11 +1557,12 @@ class Client * Generate a backup * * @note this is an experimental function, please do not use unless you know exactly what you're doing + * @param int $days number of days for which the backup must be generated * @return array|bool URL from where the backup file can be downloaded once generated, false upon failure */ - public function generate_backup() + public function generate_backup(int $days = -1) { - $payload = ['cmd' => 'backup']; + $payload = ['cmd' => 'backup', 'days' => $days]; return $this->fetch_results('/api/s/' . $this->site . '/cmd/backup', $payload); }