Commit Graph

30 Commits

Author SHA1 Message Date
malle-pietje
6754eb5041 API client class v1.1.45
- added function/method force_provision(), contributed by @VWT-Dan
- added example update_switch_poe-mode.php, contributed by @Kaltt
2020-01-30 10:09:34 +01:00
malle-pietje
2ac791a353 API client class v1.1.44
- 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
2020-01-27 13:19:49 +01:00
malle-pietje
3fd8e69b4a API client class v1.1.43
- updated code and instructions for `set_guestlogin_settings()`, thanks to @stoehrmark for reporting the issue
- added list_connected_users.php example contributed by @gahujipo
- added restart_device() which replaces restart_ap(), contributed by @leonardogyn
- code styling cleanup across `Client.php`
2019-12-13 09:15:10 +01:00
malle-pietje
c7d1eee3e3 fixed minor syntax error/typo in an example 2019-10-15 14:41:16 +02:00
malle-pietje
17bfe0087c clean up of example code based on feedback from scrutinizer-ci.com 2019-10-15 14:27:28 +02:00
malle-pietje
b3521d8c1d updated main README to include the newly added functions/methods
added example to demonstrate the use of set_super_mgmt_settings_base()
2019-10-15 14:16:23 +02:00
malle-pietje
727cd6dc9c API client class v1.1.42
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()
2019-10-15 14:04:37 +02:00
malle-pietje
09db47affd API client class v1.1.41
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
2019-04-29 17:35:09 +02:00
malle-pietje
5389f3a486 API client class v1.1.37
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
2018-11-05 12:18:10 +01:00
malle-pietje
7c6cd4eb85 removed and added spaces, and changed brackets usage following PSR-2 guidelines 2018-10-02 13:16:48 +02:00
malle-pietje
2c035878ed - added stat_speedtest_results() method/function to collect results from scheduled speed tests
- added list_backups() method/function to list auto backups
2018-08-28 14:44:49 +02:00
malle-pietje
6f1b75b89a updated comments for stats-related methods/function to make clear start/end values must be provided in milliseconds
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
2018-08-19 12:00:19 +02:00
malle-pietje
871ab82608 added user/client device stats methods/functions:
stat_5minutes_user()
stat_hourly_user()
stat_daily_user()
added example to demonstrate use of these new functions
2018-07-02 15:06:31 +02:00
malle-pietje
4dddd08d8b added unblock_list.php and block_list.php examples, contributed by @malcolmcif
added create_user() method/function
added forget_sta() method/function which is supported on controller version 5.9.* and higher
2018-05-21 13:06:50 +02:00
malle-pietje
d7827fdbf1 General code cleanup (replace tabs by spaces, etc.)
Finalised merge of PRs #10, #11, #12 and #13
Methods/functions added:
- list_country_codes()
- set_guestlogin_settings_base()
- set_site_connectivity()
- set_site_country()
- set_site_guest_access()
- set_site_locale()
- set_site_mgmt()
- set_site_name()
- set_site_ntp()
- set_site_snmp()
Examples added:
- ap_upgrade_firmware.php
- site_provisioning_example
- update_ac-iw_ports.php
2018-03-24 10:46:42 +01:00
malle-pietje
2c45d95965 Merge branch 'master' of github.com:Art-of-WiFi/UniFi-API-client
merge PRs
2018-03-24 09:29:50 +01:00
malle-pietje
ad21ebaad8 added example to change AC-IW port config
renamed update_wlan_settings_5.5.X.php to update_device_wlan_settings_5.5.X.php
2018-03-24 09:28:25 +01:00
Seth Mos
4532df8eac - Foreach the array to verify if we really need to update the settings so we only trigger for real updates. (#13)
- Move Test array settings down so you don't accidentally delete sites
- Don't delete sites in debug mode.
- Automatically adopt device if it matches the configured LAN settings, ofcourse this only works correctly when LAN settings are unique between sites.
2018-03-19 23:22:24 +01:00
4oo4
93d78b2f22 Add ap_upgrade_firmware.php to Examples (#12)
- add ap_upgrade_firmware.php, contributed by @4oo4
2018-03-18 14:28:40 +01:00
Seth Mos
9f5aaa9838 Add a few more function for setting site specific parameters. It was neccesary to create several setting functions
for setting the information, although the site configuration is returned whole as one object.

I also added a provisioning example that I use with our internal ERP that automatically creates, updates and deletes sites according to internal ERP
site information. I added a settings template that has a couple of the most useful defaults, like auto upgrade, country and locale.
2018-03-13 13:39:38 +01:00
malle-pietje
14f4d58b02 minor bugs removed from two examples 2018-02-01 17:11:05 +01:00
malle-pietje
f6201ec21c minor changes
added an example to update WLAN settings for recent controllers (5.5.X and higher)
2018-02-01 16:56:17 +01:00
malle-pietje
c25f4d1937 Update disable_device.php 2017-10-20 09:25:59 +02:00
malle-pietje
e3e70cce72 fixed bug caused by typo with "if (in_array()..." 2017-10-19 11:53:04 +02:00
malle-pietje
cc486f652d fixed typo in examples/change_wlan_password.php 2017-10-06 12:55:44 +02:00
malle-pietje
008280e870 minor code cleanup and various changes:
- added a 6th parameter to the constructor to enable SSL cert verification, recommended for production environments
- added examples/change_wlan_password.php to demonstrate WLAN password/PSK change
- updated main README accordingly
2017-10-06 12:46:07 +02:00
malle-pietje
971c77ab5f various tweaks and an addition
- more relaxed handling of $site in set_site(), now we only issue an error message when provided (short) site name is probably incorrect and debug mode is
true
- added test_connection.php, a command line script which can be used to quickly test the connection to your controller with various cURL options which you can
quickly change
2017-09-14 12:15:21 +02:00
malle-pietje
efa6704c97 minor changes to examples and README for consistency 2017-09-07 12:31:47 +02:00
Erik Slooff
cd24ef1c2c updated examples to use the composer autoloader 2017-09-05 13:04:11 +02:00
Erik Slooff
508dde33f0 initial commit 2017-09-05 11:48:35 +02:00