Commit Graph

184 Commits

Author SHA1 Message Date
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
55867197e3 fixed functions assign_existing_admin() and invite_admin() to support controller versions 5.9 and higher because of changes in controller behavior 2019-01-21 09:41:47 +01:00
malle-pietje
78bed0895d minor code tweaks for improved readability
added function/method assign_existing_admin()
fixed code for function/method invite_admin()
2019-01-19 15:17:53 +01:00
malle-pietje
77cc1d87a4 made regex to extract cookies case insensitive, though this would only be needed for corner cases this is still RFC compliant (https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2)
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
2018-12-14 11:27:20 +01: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
2a566ad18a API client class v1.1.36
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
2018-10-24 09:54:43 +02:00
malle-pietje
1714e9587c general code cleanup
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
2018-10-20 14:29:08 +02:00
malle-pietje
cd92192cb8 API client class v1.1.34
- added spaces throughout Client.php following PSR-2 guidelines
- changed checks to prevent 0 (zero) values from being submitted to the API for routes where this can have negative side effects
2018-10-10 10:14:00 +02: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
30f4230cfd Merge branch 'master' of github.com:Art-of-WiFi/UniFi-API-client into tempbranch 2018-10-02 12:10:46 +02:00
Jamie Aitken
88263f6863 getters and setters for private variables (#28)
Merging PR #28
2018-10-02 11:12:34 +02:00
malle-pietje
1017d1461e Commiting some changes to tempbranch before merging in a new PR 2018-10-02 11:10:46 +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
de407e6ac0 cleanup of merge conflicts 2018-08-19 12:13:53 +02:00
malle-pietje
006702db0c Merge branch 'master' of github.com:Art-of-WiFi/UniFi-API-client
resilve merge conflicts
2018-08-19 12:02:32 +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
Alex Paredes Martinez
287c67c39e Dev edit client fixedip (#24)
* Added Fixed ip function

Sets the value of use_fixedip and fixed_ip fields of a specific client.

* Added network_id field

-Optional fields network_id and fixed_ip
-If use_fixedip is false, network_id and fixed_ip will be ignored
-If else, send the data if defined (if not, previous values)

* fix typo (forgot to includo json_encode)

* Get specific network data by its ID
2018-08-19 11:59:03 +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
ccea0eee99 re-added the upgrade_device() function/method 2018-04-11 07:50:49 +02:00
malle-pietje
a238ced589 added methods/functions start_rolling_upgrade() and cancel_rolling_upgrade() 2018-04-10 15:24:12 +02:00
malle-pietje
bf9a6e801c added invite_admin() and revoke_admin() functions/methods 2018-03-30 13:57:59 +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
malle-pietje
546334c88e
Merge pull request #11 from smos/master
Add a few more function for setting site specific parameters. It was …
2018-03-17 14:05:45 +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
757cf68698
Merge pull request #10 from patrice-guillemette/master
PR by @patrice-guillemette to update Client.php
- add method/function set_site_name()
- add method/function set_guestlogin_settings_base()
2018-03-10 09:00:25 +01:00
Patrice Guillemette
774fced2da
Update Client.php 2018-03-09 16:24:31 -05:00
malle-pietje
14f4d58b02 minor bugs removed from two examples 2018-02-01 17:11:05 +01:00
malle-pietje
77972aab55 removed donation section from README (...) 2018-02-01 17:04:13 +01:00
malle-pietje
9629cc909d Merge branch 'master' of github.com:Art-of-WiFi/UniFi-API-client 2018-02-01 16:57:18 +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
dcf7d2059c
removed some spaces for cosmetic reasons only 2018-01-29 13:36:13 +01:00
malle-pietje
7a5e2b5bbb
Merge pull request #7 from JaspervRijbroek/master
Allow for extendibility. Thanks to @JaspervRijbroek
2018-01-29 13:34:06 +01:00
Jasper van Rijbroek
1db9040ea8
Allow for extendibility. 2018-01-20 15:46:04 +01:00
malle-pietje
cab0c1a35d Update README.md 2017-10-26 17:14:39 +02:00
malle-pietje
2b5ed31759 Update README.md 2017-10-26 17:12:51 +02:00
malle-pietje
a13ff36409 Merge branch 'master' of github.com:Art-of-WiFi/UniFi-API-client 2017-10-26 17:07:48 +02:00
malle-pietje
c4bc1243eb - minor code cleanup and input validation/sanitization improvements
- added delete_device() function/method
- added move_device() function/method
- added optional `type` parameter to stat_sessions()
- updated README
2017-10-26 17:06:59 +02: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
449baa70a3 updated README 2017-10-19 11:24:24 +02:00
malle-pietje
2dc5136eba minor code clean up
added archive_alarm() function/method
2017-10-19 11:20:33 +02:00
malle-pietje
e1f3cd6e73 updates to README 2017-10-18 10:09:55 +02:00