Skip to content

Commit 6e9adeb

Browse files
author
Koman Rudden
committed
fix: update API method names for consistency and improve type hints
1 parent c4e8edc commit 6e9adeb

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ htmlcov/
4242
.cache
4343
nosetests.xml
4444
coverage.xml
45-
*,cover
45+
*.cover
4646
.hypothesis/
4747
venv/
4848
.venv/

kinde_sdk/management/management_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import inspect
1010
import logging
1111
import re
12+
from typing import Optional
1213
import warnings
1314

1415
# Import the api module to dynamically load all API classes
@@ -69,7 +70,7 @@ class ManagementClient:
6970
orgs = client.organizations_api.get_organizations()
7071
7172
# Access any dynamically loaded API
72-
billing = client.billing_api.get_billing_info()
73+
timezones = client.timezones_api.get_timezones()
7374
```
7475
"""
7576

@@ -261,7 +262,7 @@ def _class_name_to_snake_case(class_name: str) -> str:
261262
# Backwards compatibility: Provide direct method access for common operations
262263
# These delegate to the appropriate API class methods
263264
# Note: These methods are deprecated. For full functionality and proper type hints,
264-
# use the API class methods directly (e.g., client.users.get_users())
265+
# use the API class methods directly (e.g., client.users_api.get_users())
265266

266267
def get_users(self, **kwargs):
267268
"""
@@ -375,7 +376,7 @@ def get_organizations(self, **kwargs):
375376
)
376377
return self.organizations_api.get_organizations(**kwargs)
377378

378-
def get_organization(self, code: str = None, **kwargs):
379+
def get_organization(self, code: Optional[str] = None, **kwargs):
379380
"""
380381
Get an organization.
381382

testv2/testv2_management/test_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def test_get_user_with_path_parameter(self, mock_token_manager_class, mock_api_c
356356

357357
# Test API call with path parameter
358358
user_id = "user123"
359-
result = client.get_users(user_id=user_id)
359+
result = client.get_user_data(user_id)
360360

361361
# Verify param_serialize was called
362362
mock_api_client_instance.param_serialize.assert_called_once()

0 commit comments

Comments
 (0)