Commit Graph

164 Commits

Author SHA1 Message Date
malle-pietje
fd69d844a6 API client class v1.1.93
- added the migrate_device() method to migrate one or more devices from one controller to another
- added the cancel_migrate_device() method to cancel the migration for one or more devices
- added the upgrade_all_devices() method to upgrade all devices of a selected type to the latest firmware version
- changed the force_provision() method to allow for multiple MAC addresses to be passed as a parameter
- minor changes to a number of doc-blocks
- general changes for improved consistency and readability
2024-08-07 16:03:09 +02:00
malle-pietje
12b85ce9db moved 2 properties to constants which seems more appropriate
reformatted single-line comments
2024-08-06 12:30:47 +02:00
malle-pietje
54ec631d4b added a new example demonstrating the change of site settings 2024-08-04 15:35:26 +02:00
Jacob Timmerman
fdea77fce0
Add days paramater to generate_backup method (#232) 2024-08-02 17:12:29 +02:00
malle-pietje
108ddd3995 further cleanup of notes in doc blocks 2024-07-31 11:16:02 +02:00
malle-pietje
63600f4da1 - added delete_admin()` method, contributed by @Jacobtims
- reformatting of notes in the doc blocks
2024-07-31 10:55:21 +02:00
malle-pietje
20aa3e1377 merging PR #228 2024-07-31 10:25:02 +02:00
malle-pietje
d36a088101 API client class v1.1.90
- remove existing x-csrf-token headers before adding a new one, UniFi OS does not like multiple x-csrf-tokens in the same request
2024-02-27 18:48:41 +01:00
malle-pietje
007117cbfc API client class v1.1.89
- added `create_tag()`, `set_tagged_devices()`, `get_tag()`, and `delete_tag()` methods to manage tags, contributed by @brenard, #205
2024-02-11 17:24:31 +01:00
malle-pietje
7e60ce3e87 API client class v1.1.88
- added list_fingerprint_devices() method to list fingerprints for clients devices, contributed by @dream-rhythm, #213
- minor code cleanup
2024-02-11 14:46:30 +01:00
malle-pietje
83d4f121ed API client class v1.1.87
- further code cleanup and refactoring to pass more phpstan tests
2024-02-11 12:33:37 +01:00
malle-pietje
bd39c325d2 API client class v1.1.86
- fixes issue with curl_init() returning CurlHandle class objects instead of curl handlers with PHP 8 and higher
2024-02-10 13:26:47 +01:00
malle-pietje
4b175ddf9b API client class v1.1.85
- removed unnecessary type casting in several methods
- fixed return type hinting in several methods where return type would be an array|bool instead of just array
- relaxed parameter type hinting in the constructor to allow for null values for several parameters ($site and $version) that have sensible defaults, reported by @pbksol
- using phpstan, the class now passes level 5 checks
2024-02-10 12:13:00 +01:00
malle-pietje
48482d661a API client class v1.1.84
- PHP 7.4 is now the minimum required version
- updated the code for 7.4. specific features such as parameter type hinting, return types, etc.
- added the ability to the constructor to change the key that is used to store the unificookie in the session,
  ($_SESSION['unificookie'] is used by default), this is useful when running multiple applications on the same server
2024-02-09 18:11:43 +01:00
malle-pietje
563739345c applied tweaks to the README file 2024-01-05 11:08:06 +01:00
malle-pietje
fdc5f06765 applied tweaks to the README file 2024-01-05 11:04:39 +01:00
malle-pietje
35b2fb37f3 applied tweaks to the README file 2024-01-05 11:02:38 +01:00
malle-pietje
8c1b33ed09 added note to README regarding Issues that are not related to the PHP API client 2024-01-05 10:47:11 +01:00
malle-pietje
b6a22abc01 further changes and updates to the README file 2023-12-21 11:09:36 +01:00
malle-pietje
3aa658eab0 minor changes to the instructions in the README file 2023-12-21 10:41:38 +01:00
malle-pietje
a4258f1963 updated the instructions in the README file 2023-12-21 10:36:10 +01:00
malle-pietje
cf5ba015b0 removed statement about cookies no longer being supported... 2023-12-18 15:15:19 +01:00
malle-pietje
2970f79290 API client class v1.1.83
- added a 'accept: application/json' header to the login requests
- re-added support for cookies when working with a UniFi OS-based controller
2023-12-18 15:08:24 +01:00
malle-pietje
7fe7a40873 further updates to README 2023-12-18 12:35:58 +01:00
malle-pietje
df1f70547c updated README
added announcement of minimum PHP version moving to 7.4
2023-12-18 12:32:03 +01:00
malle-pietje
e89daaf1a3 API client class v1.1.82
- allow filtering by multiple MAC addresses in list_devices(), contributed by @sgrodzicki, #189
2023-12-18 11:42:56 +01:00
malle-pietje
d66c3ddd75 API client class v1.1.81
- 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
2023-12-18 11:11:27 +01:00
malle-pietje
9e092f8b85 Merge branch 'master' of github.com:Art-of-WiFi/UniFi-API-client
merge for device-basic
2023-03-28 12:22:42 +02:00
Sebastian Grodzicki
e4dc2e273c
Add stat/device-basic endpoint (#188)
Merge to include device-basic endpoint
2023-03-28 12:21:43 +02:00
malle-pietje
67d318ca91 - bumped version to class v1.1.80
- added generate_backup_site() method, contributed by @labo-jad
2023-03-28 12:19:29 +02:00
malle-pietje
cbe89d913c API client class v1.1.79
- 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
2022-03-28 11:57:57 +02:00
malle-pietje
4fe1780e1d API client class v1.1.78
- fixed `create_radius_account()` method to make Tunnel Type and Medium optional parameters, reported by @CodeByJacob
2022-03-11 13:24:31 +01:00
malle-pietje
61bd2eda0d API client class v1.1.77
- removed unnecessary CURLOPT_HEADER from the login() method
- added several more possible attributes for client stats
- cast VLAN id to string in create_radius_account()
2022-03-11 12:08:40 +01:00
malle-pietje
746fb0933c API client class v1.1.76
- minor changes based on feedback by Scrutinizer
- removed use of CURLOPT_NOBODY in login() method
- switched to using cURL's default HTTP version
2021-12-29 15:01:12 +01:00
malle-pietje
aefbbdc5e1 API client class v1.1.75
- 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
2021-12-18 12:00:56 +01:00
malle-pietje
fbfd6a8246 API client class v1.1.74
- minor refactoring
- fixed minor typos
- updated README to reflect limited visibility when using read-only administrator accounts, reported by @KetchupBomb and @NickDunas
2021-11-08 10:30:22 +01:00
malle-pietje
310abc43b5 API client class v1.1.73
- 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
2021-10-23 11:14:25 +02:00
malle-pietje
01eafb516a Merge branch 'master' of github.com:Art-of-WiFi/UniFi-API-client
merge #133
2021-10-23 10:34:46 +02:00
Paulo Ferreira
c3c44d61e4
Add method rename client (#133)
* Update Client.php

Add method rename client

* Update README.md
2021-10-23 10:34:39 +02:00
malle-pietje
2e7b556d8e Merge branch 'master' of github.com:Art-of-WiFi/UniFi-API-client
merged #132
2021-10-23 10:32:41 +02:00
malle-pietje
e7e1540df4 - 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
2021-10-23 10:32:20 +02:00
Paulo Ferreira
adb98a3c8e
Update README.md (#132)
Fix parameters separations
2021-10-22 17:35:05 +02:00
malle-pietje
9cca43557c API client class v1.1.72
- 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
2021-10-19 10:39:17 +02:00
malle-pietje
13b6699889 API client class v1.1.71
- 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
2021-09-29 10:41:39 +02:00
malle-pietje
665fed93e2 shortened several property names 2021-03-22 11:58:20 +01:00
malle-pietje
36c0fecaff minor improvements 2021-03-22 11:52:44 +01:00
malle-pietje
474578a9d5 removed non-compliant header suffix 2021-03-21 16:08:55 +01:00
malle-pietje
5281db56de API client class v1.1.69
- added list_device_states() function/method, as suggested by @hoerter
- implemented fix to prevent cURL from sending an `Expect: 100-continue` header with each POST request
- implemented a callback function with the CURLOPT_HEADERFUNCTION option to process the response headers after each request and extract the Cookie contents
- general cleanup
2021-03-21 16:03:05 +01:00
malle-pietje
021d01ba86 API client class v1.1.68
- fixed a bug that was introduced with 1.1.67 and would only occur in certain corner cases
2021-01-24 18:09:38 +01:00
malle-pietje
caf838abb9 API client class v1.1.67
- fixed a bug where the request headers for subsequent function calls within the same Client instance would not always be cleared
2021-01-24 17:58:23 +01:00