Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd24ef1c2c | ||
|
|
e4d368cc72 |
@@ -122,6 +122,12 @@ A basic example how to use the class:
|
|||||||
```php
|
```php
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the class using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initialize the Unifi API connection class, log in to the controller and request the alarms collection
|
* initialize the Unifi API connection class, log in to the controller and request the alarms collection
|
||||||
* (this example assumes you have already assigned the correct values to the variables used)
|
* (this example assumes you have already assigned the correct values to the variables used)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"UniFi-API\\": "src/"
|
"UniFi_API\\": "src/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,11 @@
|
|||||||
* description: example basic PHP script to fetch an Access Point's scanning state/results
|
* description: example basic PHP script to fetch an Access Point's scanning state/results
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc. there if not already present)
|
* include the config file (place your credentials etc. there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
* description: example basic PHP script to perform a basic auth of a guest device
|
* description: example basic PHP script to perform a basic auth of a guest device
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc. there if not already present)
|
* include the config file (place your credentials etc. there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
* description: example basic PHP script to auth a guest device and attach a note to it
|
* description: example basic PHP script to auth a guest device and attach a note to it
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc. there if not already present)
|
* include the config file (place your credentials etc. there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
* description: example basic PHP script to create a set of vouchers
|
* description: example basic PHP script to create a set of vouchers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc. there if not already present)
|
* include the config file (place your credentials etc. there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
* description: example of how to extend validity of guest authorizations
|
* description: example of how to extend validity of guest authorizations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc. there if not already present)
|
* include the config file (place your credentials etc. there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
* description: example basic PHP script to pull current alarms from the UniFi controller and output in json format
|
* description: example basic PHP script to pull current alarms from the UniFi controller and output in json format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc. there if not already present)
|
* include the config file (place your credentials etc. there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
* in raw HTML format
|
* in raw HTML format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc there if not already present)
|
* include the config file (place your credentials etc there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
* in json format
|
* in json format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc. there if not already present)
|
* include the config file (place your credentials etc. there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
* them in basic HTML format
|
* them in basic HTML format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc. there if not already present)
|
* include the config file (place your credentials etc. there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
* output the response in json format
|
* output the response in json format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* using the composer autoloader
|
||||||
|
*/
|
||||||
|
require "vendor/autoload.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include the config file (place your credentials etc. there if not already present)
|
* include the config file (place your credentials etc. there if not already present)
|
||||||
* see the config.template.php file for an example
|
* see the config.template.php file for an example
|
||||||
|
|||||||
Reference in New Issue
Block a user