From 90b41f73e6879351e0b923b255adecfe6fd7fbc3 Mon Sep 17 00:00:00 2001 From: malle-pietje Date: Sat, 10 Dec 2016 08:32:45 +0100 Subject: [PATCH] API Browser version 1.0.7, API client class version 1.0.10 - API Browser: minor code cleanup - API Browser: improved/cleaner layout - API Browser: added Source Integrity hashes for most external resources - API client class: general code cleanup --- README.md | 4 +- index.php | 132 +- phpapi/class.unifi.php | 2781 +++++++++++++++++++++------------------- 3 files changed, 1510 insertions(+), 1407 deletions(-) diff --git a/README.md b/README.md index 15b6e16..af2fd72 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## UniFi API browser This tool is for browsing data that is exposed through Ubiquiti's UniFi Controller API, written in PHP, JavaScript and the [Bootstrap] (http://getbootstrap.com/) CSS framework. Please keep the following in mind: - not all data collections/API endpoints are supported (yet), see the list below of currently supported data collections/API endpoints -- currently supports versions 4.x.x and 5.x.x of the UniFi Controller software (version 5.3.7 has been confirmed to work) +- currently supports versions 4.x.x and 5.x.x of the UniFi Controller software (version 5.3.8 has been confirmed to work) - there is still work to be done to add/improve functionality and usability of this tool so suggestions/comments are welcome. Please use the github issue list or the Ubiquiti Community forums (https://community.ubnt.com/t5/UniFi-Wireless/UniFi-API-browser-tool-released/m-p/1392651) to share your ideas. - please read the Security Notice below before installing this tool! @@ -69,7 +69,7 @@ Please note that the bundled API client supports many more API endpoints, not al The PHP API client that comes bundled with this tool is based on the work done by the following developers: - domwo: http://community.ubnt.com/t5/UniFi-Wireless/little-php-class-for-unifi-api/m-p/603051 - fbagnol: https://github.com/fbagnol/class.unifi.php -- and the API as published by Ubiquiti: https://www.ubnt.com/downloads/unifi/5.2.9/unifi_sh_api +- and the API as published by Ubiquiti: https://www.ubnt.com/downloads/unifi/5.3.8/unifi_sh_api Other included libraries: - Bootstrap (version 3.3.6) http://getbootstrap.com/ diff --git a/index.php b/index.php index 723b2bc..b10d876 100644 --- a/index.php +++ b/index.php @@ -3,18 +3,14 @@ * UniFi API Browser * * This tool is for browsing data that is exposed through Ubiquiti's UniFi Controller API, - * written in PHP, javascript and the Bootstrap CSS framework. + * written in PHP, JavaScript and the Bootstrap CSS framework. * * Please keep the following in mind: - * - not all data collections/API endpoints are supported (yet), see the list below of - * the currently supported data collections/API endpoints - * - currently only supports versions 4.x.x of the UniFi Controller software - * - there is still work to be done to add/improve functionality and usability of this - * tool so suggestions/comments are welcome. Please use the github issue list or the - * Ubiquiti Community forums for this: - * https://community.ubnt.com/t5/UniFi-Wireless/UniFi-API-browser-tool-released/m-p/1392651 + * - not all data collections/API endpoints are supported (yet), see the list of + * the currently supported data collections/API endpoints in the README.md file + * - this tool currently supports versions 4.x and 5.x of the UniFi Controller software * - * VERSION: 1.0.6 + * VERSION: 1.0.7 * * ------------------------------------------------------------------------------------ * @@ -24,11 +20,10 @@ * with this package in the file LICENSE.md * */ - -define('API_BROWSER_VERSION', '1.0.6'); +define('API_BROWSER_VERSION', '1.0.7'); /** - * to use the PHP $_SESSION array for temporary storage of variables, session_start() is required + * in order to use the PHP $_SESSION array for temporary storage of variables, session_start() is required */ session_start(); @@ -60,8 +55,8 @@ * - if the config.php file is unreadable or does not exist, an alert is displayed on the page */ if(!is_readable('config.php')) { - $alert_message = '