mirror of
https://github.com/Art-of-WiFi/UniFi-API-client.git
synced 2024-11-25 03:30:42 +01:00
Add days paramater to generate_backup method (#232)
This commit is contained in:
parent
108ddd3995
commit
fdea77fce0
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user