- hotfix to address cookie issues in UniFi OS 3.2.7, reported by @tflatebo
- fixed minor typos
- minor code reformatting of the examples
- starting with this release, cookies are no longer supported when connecting to a UniFi OS-based controller
- added set_vlan_to_port.php example, contributed by @SamuelSchnelly, #203
- allow additional parameters in `create_wlan()`'s payload, contributed by @sgrodzicki, #191
- updated README to reflect support for 7.X
- `get_last_error_message()` now always returns a string which is empty if no message is available
- applied PR #151 in slightly different way for consistency with other similar code sections, contributed by @banakito
- changed default argument values in several methods/functions from null to an empty string
- updated docblocks to be less USG-specific
- removed content-length header from the logout method, reported by @Olivier6767
- added notes to reflect successful tests with UDR running latest Pre-Release version of the UniFi controller (version 6.5.52)
- added checks in specific cases when using trim() to prevent PHP 8 from throwing an error when the variable is null, submitted by @djchen
- minor refactoring
- fixed minor typos
- updated README to reflect limited visibility when using read-only administrator accounts, reported by @KetchupBomb and @NickDunas
- minor spacing changes based on Scrutinizer feedback
- updated create_wlan() method/function to work with the new way of assigning a VLAN which now requires passing the _id value
of the VLAN, reported by @BeneReuthlinger
- merged #132, README update, contributed by @pauloboc
- merged #133, adds edit_client_name() method, contributed by @pauloboc
- added property $request_timeout to control the cURL option CURLOPT_TIMEOUT, contributed by @mreho
- added setter and getter for $request_timeout, contributed by @mreho
- changed default value for the cURL option CURLOPT_HTTP_VERSION to CURL_HTTP_VERSION_1_1:
- as of cURL version 7.62.0 the default value is CURL_HTTP_VERSION_2TLS which may cause issues
- https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html
- added property for $curl_http_version to hold the value for CURLOPT_HTTP_VERSION
- added setter and getter for $curl_http_version
- switched to using a constant to hold the class version
- updated the README file
- modified `create_radius_account()` method to make Tunnel Type and Medium optional parameters, contributed by @mreho
- added `advanced_adopt_device()` method for more advanced adoption capabilities, contributed by @Sarrus
- refactored several code sections
- updated connection test script
- applied minor improvements based on Scrutinizer reports
- applied minor changes to `authorize_guest()` to further improve handling of 0/null/empty values passed
- restricted protocols to be used by cURL to only allow http and https for improved security
- added methods/functions `list_device_name_mappings()` and `stat_full_status()`
- added information to several docblocks
- changed handling of request headers, added private property for this
- applied changes for improved use of require_once in the README and examples
- added `list_sites()` example
- *potential breaking changes:*
renamed `get_request_type()` and `set_request_type()` functions/methods to `get_request_method()` and `set_request_method()` respectively
- changed references to *UbiOS* back to *UniFi OS*
- removed capitalization from all header strings (per RFC, header fields are case-insensitive: https://tools.ietf.org/html/rfc7230#section-3.2)
- removed charset parameter from headers (not required per RFC)
- added x-csrf-token header to all requests except GET when talking to UniFi OS-based controllers, thanks go to @paciks for raising #86
- added several monthly stats methods: `stat_monthly_gateway()`, `stat_monthly_site()`, `stat_monthly_aps()`, `stat_monthly_user()`, thanks go to @Roel Janssens for spotting these MongoDB collections
- test for `object` or `resource` in `get_curl_resource()`, closes PR #82 submitted by @banakito
- applied change to comments in `example/modify_smartpower_pdu_outlet.php` based on a suggestion by @thesohoguy
- removed unnecessary variable from `list_apgroups()`, thanks go to Stephen Davies for reporting
- added an optional parameter $ap_group_ids to the `create_wlan()` function/method for UniFi controller versions 6.0.X and higher, thanks go to Stephen Davies for contributing
- minor improvements of comments contents
- fixed naming error in comments for list_devices()
- updated supported controller versions in main README
- change variable names used from MBytes to megabytes for improved consistency
- added methods/functions to manage AP groups: list_apgroups(), create_apgroup(), edit_apgroup(), and delete_apgroup() (only supported with controller versions 6.0.X and higher)
- adapted code to handle the behavior of the new v2 API routes that were added with controller versions 6.0.X and higher
- merged PR #76 which adds methods/functions check_controller_update() and check_firmware_update(), contributed by @brenard
- further work on updating method/function comments to PHPDoc format (PSR-5)
- changed several references from UniFi SDN controller to UniFi Network controller
- added optional payload parameter to the list_alarms() method/function, contributed by @MikeSiekkinen through PR #68
- added example showing how to disable/enable a UniFi switch port
- updated restart_device() function/method, thanks go to @leonardogyn for reporting this
- added example to modify outlet settings on a UniFi SmartPower PDU Pro, thanks go to @panthergm for providing access
- increased minimum required PHP version to 5.5.0
- minor syntax improvement based on Scrutinizer feedback
- added create_dynamicdns() and set_dynamicdns() methods, "borrowed" routes from @smos
- added set_element_adoption() method, contributed by @VWT-Dan
- made a start at changing the function/method comments to PHPDoc format (PSR-5) which will support auto-generated class documentation (https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#5-the-phpdoc-format)
- added check to throw an error when the $baseurl ends with a / character, thanks to @infraweavers for submitting #66
- fixed issue with logout() on UDM PROs, thanks go to @Olivier6767 for providing access to a UDM PRO, addresses #63
- applied several code styling improvements
- added list_routing() method/function, contributed by @VWT-Dan
- added list_firmware() method/function
- added get_class_version() method/function, returns the (semantic) version number of the Class
- cleaned up the class to remove repetitive code
- changed names of several protected functions for improved consistency
- general code clean up
- minor additions to the main README file
- updated README with all getter and setter methods/functions
- updated get_cookies() and get_cookie() for consistency
- get_cookie() remains for backward compatibility only, should not be used in new code
- fix rare cases where the client would end up in a loop, e.g. issuing a request for a site the cached credentials have no
access to
- applied patches to update_switch_poe-mode.php as suggested by scrutinizer-ci.com
- code clean up and improvements in preparation of support for UniFi OS-based controllers
- added support for UniFi OS-based controllers, thanks to @Scyto for providing access
- adapt login route and method, and base URL for UniFi OS-based controllers
- automatically identify UniFi OS-based controllers, thanks to @TwitchCaptain for this and several other suggestions
- relaxed URL validation to allow UniFi OS-based controllers to pass
- changed default HTTP method to GET
- many improvements throughout the code
- added example script reconnect_client.php
- fixed typo in URL linking to UniFi section on the UI.com site
- add function/method reboot_cloudkey(), contributed by @leonardogyn
changed variable name $url to $path in custom_api_request() for consistency and clarity
rearranged layout of Client.php
added check to verify whether $ch is a resource
renamed get_curl_obj() to get_curl_resource() to reflect the variable type it returns
Added the new functions/methods:
* set_super_mgmt_settings_base()
* set_super_smtp_settings_base()
* set_super_identity_settings_base()
changed create_wlan function/method to not include passphrase in payload when security = "open" and passphrase = null
fixed indentations in several places
added custom_api_request() function/method which allows a programmer to issue custom API requests that may not yet be supported by this client (to be used with care!)
added example to demonstrate use of custom_api_request()
removed repetitive code and optimized exec_curl() when creating the final payload, resulting in 10-20% performance increase and slightly lower memory consumption by PHP
changed the layout of the README file to put more emphasis on the installation options and the basic example, and less on the list of methods/functions
updated both READMEs
added cmd_stat() function, can currently only be used to reset DPI counters for the current site
added optional group_id parameter to list_firewallgroups() which allows you to select a single firewall group, thanks to @VWT-Dan for the suggestion
added methods stat_ips_events(), set_ips_settings_base(), supported with controllers 5.9.10 and higher
thanks go to @leonardogyn for providing access to a controller and test network for test/validation purposes
added spaces throughout Client.php following PSR-2 guidelines that were skipped with the previous commit
added visibility to constructor and destructor methods following PSR-2 recommendations
declare user and password properties and visibility following PSR-2 recommendations
updated README to add recently added functions/methods
minor general changes to the README
changed use of objects as payload input for json_encode, to associative arrays for consistency
added functions/methods for firewall groups: list_firewallgroups(), create_firewallgroup(), edit_firewallgroup(), delete_firewallgroup()
added checks for required boolean parameters