Python-Unifi-Client 1.2.9__py3-none-any.whl → 1.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_unifi_client/client.py +3 -37
- {python_unifi_client-1.2.9.dist-info → python_unifi_client-1.3.0.dist-info}/METADATA +1 -1
- python_unifi_client-1.3.0.dist-info/RECORD +6 -0
- python_unifi_client-1.2.9.dist-info/RECORD +0 -6
- {python_unifi_client-1.2.9.dist-info → python_unifi_client-1.3.0.dist-info}/WHEEL +0 -0
- {python_unifi_client-1.2.9.dist-info → python_unifi_client-1.3.0.dist-info}/top_level.txt +0 -0
python_unifi_client/client.py
CHANGED
|
@@ -1753,7 +1753,7 @@ class Client:
|
|
|
1753
1753
|
list/dict: Created profile data (includes '_id' field)
|
|
1754
1754
|
"""
|
|
1755
1755
|
self._curl_method = 'POST'
|
|
1756
|
-
result = self.fetch_results(f'/api/s/{self._site}/rest/radiusprofile')
|
|
1756
|
+
result = self.fetch_results(f'/api/s/{self._site}/rest/radiusprofile', payload=data)
|
|
1757
1757
|
self._curl_method = 'GET'
|
|
1758
1758
|
return result
|
|
1759
1759
|
|
|
@@ -1775,7 +1775,7 @@ class Client:
|
|
|
1775
1775
|
bool/dict: Success indicator or updated profile data
|
|
1776
1776
|
"""
|
|
1777
1777
|
self._curl_method = 'PUT'
|
|
1778
|
-
result = self.fetch_results(f'/api/s/{self._site}/rest/radiusprofile/{profile_id}')
|
|
1778
|
+
result = self.fetch_results(f'/api/s/{self._site}/rest/radiusprofile/{profile_id}', payload=data)
|
|
1779
1779
|
self._curl_method = 'GET'
|
|
1780
1780
|
return result
|
|
1781
1781
|
|
|
@@ -3048,38 +3048,4 @@ class Client:
|
|
|
3048
3048
|
|
|
3049
3049
|
payload = {'email': email, 'is_resend': True}
|
|
3050
3050
|
self._curl_method = 'POST'
|
|
3051
|
-
return self.fetch_results("/api/v2/users/invite_add", payload=payload, proxy_type='users')
|
|
3052
|
-
|
|
3053
|
-
def transfer_ownership(client:Client, email:str):
|
|
3054
|
-
"""
|
|
3055
|
-
Transfer ownership of the udm
|
|
3056
|
-
|
|
3057
|
-
Args:
|
|
3058
|
-
client -> Unifi Client API
|
|
3059
|
-
email -> Email of the account you wish to transfer ownership
|
|
3060
|
-
|
|
3061
|
-
Returns:
|
|
3062
|
-
API response data
|
|
3063
|
-
"""
|
|
3064
|
-
if email is None:
|
|
3065
|
-
return {'msg': 'error', 'error': 'No email was provided'}
|
|
3066
|
-
|
|
3067
|
-
sesh = client._session
|
|
3068
|
-
|
|
3069
|
-
url = f'{client._baseurl}/api/users/owner/transfer'
|
|
3070
|
-
payload = {
|
|
3071
|
-
'email': email,
|
|
3072
|
-
'removeS2S': True
|
|
3073
|
-
}
|
|
3074
|
-
|
|
3075
|
-
result = sesh.post(url=url, json=payload, verify=False)
|
|
3076
|
-
return result.json()
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
client = Client(baseurl='https://47.22.145.45', user='admin', password='29FGVL871##FQj#t', ssl_verify=False, debug=False)
|
|
3081
|
-
client.login()
|
|
3082
|
-
|
|
3083
|
-
result = client.list_radius_profiles()
|
|
3084
|
-
|
|
3085
|
-
print(result)
|
|
3051
|
+
return self.fetch_results("/api/v2/users/invite_add", payload=payload, proxy_type='users')
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
python_unifi_client/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
2
|
+
python_unifi_client/client.py,sha256=09l-iE9q3E4LAyWwEtE66lRg3-yZWA2rQAVF-O9hx4E,124088
|
|
3
|
+
python_unifi_client-1.3.0.dist-info/METADATA,sha256=JUTTsV2tpM8pWT9XfFwq661bOVTZBqQDDFj0pI1-1Iw,2483
|
|
4
|
+
python_unifi_client-1.3.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
5
|
+
python_unifi_client-1.3.0.dist-info/top_level.txt,sha256=675fDdb69Hi9X8pSEGl6f03ZpUXNiumV-s1B1gXEeYs,20
|
|
6
|
+
python_unifi_client-1.3.0.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
python_unifi_client/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
2
|
-
python_unifi_client/client.py,sha256=Pa0jpIo27T1CUcD_CKy2HHJ8gdZ7yraXe1JgEm5zdd8,124890
|
|
3
|
-
python_unifi_client-1.2.9.dist-info/METADATA,sha256=lRxH3rsnPzLkAEkSp1DR9imzbiibUlOEznyAUUxVsjo,2483
|
|
4
|
-
python_unifi_client-1.2.9.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
5
|
-
python_unifi_client-1.2.9.dist-info/top_level.txt,sha256=675fDdb69Hi9X8pSEGl6f03ZpUXNiumV-s1B1gXEeYs,20
|
|
6
|
-
python_unifi_client-1.2.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|