Skip to content

Commit

Permalink
included API client class v1.1.31
Browse files Browse the repository at this point in the history
added support for list_firewallgroups()
implemented fix for site names with Ampersands not showing up correctly in the nav bar
  • Loading branch information
malle-pietje committed Aug 19, 2018
1 parent 2b34c23 commit 00fd553
Show file tree
Hide file tree
Showing 7 changed files with 180 additions and 71 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You will find examples and detailed instructions there.
Please keep the following in mind:
- the API Browser tool doesn't support all available data collections/API endpoints, see the list below of those that are currently supported
- currently, versions 4.x.x and 5.x.x of the UniFi Controller software are supported (version 5.7.20 has been confirmed to work)
- currently, versions 4.x.x and 5.x.x of the UniFi Controller software are supported (version 5.8.24 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](https://github.com/Art-of-WiFi/UniFi-API-browser/issues) 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/questions.
- please read the Security Notice below before installing this tool!
Expand Down Expand Up @@ -68,11 +68,12 @@ The UniFi API browser tool offers the following features:
- list admins for current site
- sysinfo
- self
- wlan config
- list wlan config
- list VoIP extension
- list network configuration
- list port configurations
- list port forwarding rules
- list firewall groups
- list current channels
- list DPI stats
- dynamic DNS configuration
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* with this package in the file LICENSE.md
*
*/
define('API_BROWSER_VERSION', '1.0.28');
define('API_BROWSER_VERSION', '1.0.29');
define('API_CLASS_VERSION', get_client_version());

/**
Expand Down Expand Up @@ -395,6 +395,10 @@
$selection = 'list alarms';
$data = $unifidata->list_alarms();
break;
case 'list_firewallgroups':
$selection = 'list firewall groups';
$data = $unifidata->list_firewallgroups();
break;
case 'count_alarms':
$selection = 'count all alarms';
$data = $unifidata->count_alarms();
Expand Down Expand Up @@ -711,7 +715,7 @@ function get_client_version()
usort($sites, "sites_sort");

foreach ($sites as $site) {
echo '<li id="' . $site->name . '"><a href="?site_id=' . $site->name . '&site_name=' . htmlspecialchars($site->desc) . '">' . $site->desc . '</a></li>' . "\n";
echo '<li id="' . $site->name . '"><a href="?site_id=' . $site->name . '&site_name=' . urlencode($site->desc) . '">' . $site->desc . '</a></li>' . "\n";
}
?>
</ul>
Expand Down Expand Up @@ -840,6 +844,7 @@ function get_client_version()
<li id="list_networkconf"><a href="?action=list_networkconf">list network configuration</a></li>
<li id="list_portconf"><a href="?action=list_portconf">list port configuration</a></li>
<li id="list_portforwarding"><a href="?action=list_portforwarding">list port forwarding rules</a></li>
<li id="list_firewallgroups"><a href="?action=list_firewallgroups">list firewall groups</a></li>
<li id="list_dynamicdns"><a href="?action=list_dynamicdns">dynamic DNS configuration</a></li>
<li role="separator" class="divider"></li>
<li id="list_country_codes"><a href="?action=list_country_codes">list country codes</a></li>
Expand Down
4 changes: 4 additions & 0 deletions vendor/art-of-wifi/unifi-api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The class currently supports the following functions/methods to get/post/put/del
- authorize_guest()
- block_sta()
- count_alarms()
- create_firewallgroup()
- create_hotspotop()
- create_network()
- create_radius_account()
Expand All @@ -24,12 +25,14 @@ The class currently supports the following functions/methods to get/post/put/del
- create_voucher()
- create_wlan()
- delete_device()
- delete_firewallgroup()
- delete_network()
- delete_radius_account()
- delete_site()
- delete_usergroup()
- delete_wlan()
- disable_ap()
- edit_firewallgroup()
- edit_usergroup()
- extend_guest_validity()
- forget_sta() (supported on controller version 5.9.X and higher)
Expand All @@ -49,6 +52,7 @@ The class currently supports the following functions/methods to get/post/put/del
- list_dynamicdns()
- list_events()
- list_extension()
- list_firewallgroups()
- list_guests()
- list_health()
- list_hotspotop()
Expand Down
2 changes: 2 additions & 0 deletions vendor/art-of-wifi/unifi-api-client/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This directory contains some PHP code examples which demonstrate usage of the PH
Copy the appropriate example file to your working directory together with a copy of the config.template.php file which should be renamed to config.php.
Then update the contents of your new config.php with your controller details and credentials and modify the example file as required to fit your needs.

Also make sure to update the path for the composer autoloader file (`vendor/autoload.php`) or the file containing the Class itself (`src/Client.php`) in your `require_once()` statement as required.

### Contribute

If you would like to share your own example file(s), please open an issue and include your code there or else create a pull request.
Expand Down
Loading

0 comments on commit 00fd553

Please sign in to comment.