-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bb0801
commit 2aa4eac
Showing
4 changed files
with
36 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,14 @@ | |
* | ||
* @package UniFi_Controller_API_Client_Class | ||
* @author Art of WiFi <[email protected]> | ||
* @version Release: 1.1.92 | ||
* @license This class is subject to the MIT license that is bundled with this package in the file LICENSE.md | ||
* @example This directory in the package repository contains a collection of examples: | ||
* https://github.com/Art-of-WiFi/UniFi-API-client/tree/master/examples | ||
*/ | ||
class Client | ||
{ | ||
/** Constants. */ | ||
const CLASS_VERSION = '1.1.95'; | ||
const CLASS_VERSION = '1.1.96'; | ||
const CURL_METHODS_ALLOWED = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH']; | ||
const DEFAULT_CURL_METHOD = 'GET'; | ||
|
||
|
@@ -1490,7 +1489,7 @@ public function list_rogueaps(int $within = 24) | |
} | ||
|
||
/** | ||
* Fetch known rogue access points | ||
* Fetch known rogue access points. | ||
* | ||
* @return array|bool containing known rogue access point objects | ||
*/ | ||
|
@@ -1500,7 +1499,7 @@ public function list_known_rogueaps() | |
} | ||
|
||
/** | ||
* Generate a backup | ||
* 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 | ||
|
@@ -1514,7 +1513,19 @@ public function generate_backup(int $days = -1) | |
} | ||
|
||
/** | ||
* Fetch auto backups | ||
* Download a generated backup file. | ||
* | ||
* @note this is an experimental function, please do not use unless you know exactly what you're doing | ||
* @param string $filepath the path to the generated backup file | ||
* @return string|bool the raw content of the backup file, false upon failure | ||
*/ | ||
public function download_backup(string $filepath) | ||
{ | ||
return $this->exec_curl($filepath); | ||
} | ||
|
||
/** | ||
* Fetch auto backups. | ||
* | ||
* @return array|bool containing objects with backup details on success | ||
*/ | ||
|
@@ -1526,7 +1537,7 @@ public function list_backups() | |
} | ||
|
||
/** | ||
* Generate a backup/export of the current site | ||
* Generate a backup/export of the current site. | ||
* | ||
* @note this is an experimental function, please do not use unless you know exactly what you're doing | ||
* @return array|bool URL from where the backup/export file can be downloaded once generated, false upon failure | ||
|
@@ -3102,7 +3113,7 @@ public function upgrade_device_external(string $firmware_url, $macs): bool | |
*/ | ||
public function start_rolling_upgrade(): bool | ||
{ | ||
return $this->fetch_results_boolean('/api/s/' . $this->site . '/cmd/devmgr/set-rollupgrade'); | ||
return $this->fetch_results_boolean('/api/s/' . $this->site . '/cmd/devmgr/set-rollupgrade', ['uap', 'usw', 'ugw']); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters