Python-Unifi-Client 1.2.9__tar.gz → 1.3.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python_unifi_client
3
- Version: 1.2.9
3
+ Version: 1.3.0
4
4
  Home-page: https://github.com/compdat-llc/unifi-client-python
5
5
  Author: Michael Lapinski
6
6
  Author-email: michaellapinski787@gmail.com
@@ -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')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python_unifi_client
3
- Version: 1.2.9
3
+ Version: 1.3.0
4
4
  Home-page: https://github.com/compdat-llc/unifi-client-python
5
5
  Author: Michael Lapinski
6
6
  Author-email: michaellapinski787@gmail.com
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="python_unifi_client",
8
- version="1.2.9",
8
+ version="1.3.0",
9
9
  author="Michael Lapinski",
10
10
  author_email="michaellapinski787@gmail.com",
11
11
  descripton="A python version of a github Art-of-Wifi/Unifi-API-Client",