From 76c54047d6872a27b4327bf37b2233fe212858b2 Mon Sep 17 00:00:00 2001 From: Patience Igiraneza Date: Thu, 5 Jun 2025 14:40:30 +0200 Subject: [PATCH 1/2] Feat: allow to fetch subscription --- .gitignore | 2 ++ .openapi-generator/FILES | 18 ------------------ README.md | 22 ++++++++++------------ docs/ChangeQuotaApi.md | 6 +++--- docs/CreateAliasApi.md | 6 +++--- docs/DeleteAliasApi.md | 6 +++--- docs/DeleteEmailApi.md | 6 +++--- docs/DnsInfoApi.md | 6 +++--- docs/DomainAliasApi.md | 6 +++--- docs/DomainApi.md | 6 +++--- docs/DomainInfoApi.md | 6 +++--- docs/GetTokenApi.md | 6 +++--- docs/ImportApi.md | 6 +++--- docs/RefreshTokenApi.md | 6 +++--- docs/ResetPasswordApi.md | 6 +++--- docs/SubscriptionInfoApi.md | 6 +++--- docs/SubscriptionsApi.md | 18 +++++++++--------- docs/UpgradeApi.md | 6 +++--- setup.py | 2 +- workplace_console_client/configuration.py | 4 ++-- 20 files changed, 66 insertions(+), 84 deletions(-) diff --git a/.gitignore b/.gitignore index 43995bd..428e97f 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,5 @@ target/ #Ipython Notebook .ipynb_checkpoints +README.md +setup.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d7ff0f9..17ac528 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -47,24 +47,6 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_alias_display.py -test/test_change_email_quota.py -test/test_change_quota_create200_response.py -test/test_delete_alias.py -test/test_delete_email.py -test/test_domain.py -test/test_domain_action.py -test/test_email_alias.py -test/test_email_display.py -test/test_import_create_request.py -test/test_open_exchange_create_account.py -test/test_order_display.py -test/test_password_reset.py -test/test_service_action.py -test/test_sub_scription_info.py -test/test_subscription_info_create200_response.py -test/test_subscription_info_response.py -test/test_subscriptions_read200_response.py tox.ini workplace_console_client/__init__.py workplace_console_client/api/__init__.py diff --git a/README.md b/README.md index 8ef59bf..f10fa95 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # workplace-console-client -This is the Truehost's pip package for using the workplace console API from other python applications. +Test description This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v1 -- Package version: 2.0.0 +- Package version: 1.0.0 - Generator version: 7.13.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -18,9 +18,9 @@ Python 3.9+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/truehostcloud/workplace-console-client.git +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/truehostcloud/workplace-console-client.git`) +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) Then import the package: ```python @@ -55,10 +55,10 @@ import workplace_console_client from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters @@ -91,7 +91,7 @@ with workplace_console_client.ApiClient(configuration) as api_client: ## Documentation for API Endpoints -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -146,12 +146,10 @@ Class | Method | HTTP request | Description Authentication schemes defined for the API: - -### Authorization + +### Basic -- **Type**: Bearer authentication -- **API key parameter name**: Authorization -- **Location**: HTTP header +- **Type**: HTTP basic authentication ## Author diff --git a/docs/ChangeQuotaApi.md b/docs/ChangeQuotaApi.md index c08e36e..3fa6559 100644 --- a/docs/ChangeQuotaApi.md +++ b/docs/ChangeQuotaApi.md @@ -1,6 +1,6 @@ # workplace_console_client.ChangeQuotaApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.change_quota_create200_response import Chan from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/CreateAliasApi.md b/docs/CreateAliasApi.md index 0898fb0..9c2ccce 100644 --- a/docs/CreateAliasApi.md +++ b/docs/CreateAliasApi.md @@ -1,6 +1,6 @@ # workplace_console_client.CreateAliasApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.email_alias import EmailAlias from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/DeleteAliasApi.md b/docs/DeleteAliasApi.md index 8e5f5c8..622911b 100644 --- a/docs/DeleteAliasApi.md +++ b/docs/DeleteAliasApi.md @@ -1,6 +1,6 @@ # workplace_console_client.DeleteAliasApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.delete_alias import DeleteAlias from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/DeleteEmailApi.md b/docs/DeleteEmailApi.md index 1391146..9a2b972 100644 --- a/docs/DeleteEmailApi.md +++ b/docs/DeleteEmailApi.md @@ -1,6 +1,6 @@ # workplace_console_client.DeleteEmailApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.delete_email import DeleteEmail from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/DnsInfoApi.md b/docs/DnsInfoApi.md index f7c6ceb..ad91a27 100644 --- a/docs/DnsInfoApi.md +++ b/docs/DnsInfoApi.md @@ -1,6 +1,6 @@ # workplace_console_client.DnsInfoApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -21,10 +21,10 @@ from workplace_console_client.models.dns_info_create_request import DnsInfoCreat from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/DomainAliasApi.md b/docs/DomainAliasApi.md index 6849b7a..8009885 100644 --- a/docs/DomainAliasApi.md +++ b/docs/DomainAliasApi.md @@ -1,6 +1,6 @@ # workplace_console_client.DomainAliasApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.domain import Domain from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/DomainApi.md b/docs/DomainApi.md index b20f646..e2f0298 100644 --- a/docs/DomainApi.md +++ b/docs/DomainApi.md @@ -1,6 +1,6 @@ # workplace_console_client.DomainApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.domain_action import DomainAction from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/DomainInfoApi.md b/docs/DomainInfoApi.md index f249b5e..93e681c 100644 --- a/docs/DomainInfoApi.md +++ b/docs/DomainInfoApi.md @@ -1,6 +1,6 @@ # workplace_console_client.DomainInfoApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.subscription_info_response import Subscript from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/GetTokenApi.md b/docs/GetTokenApi.md index c26bfa8..5701edf 100644 --- a/docs/GetTokenApi.md +++ b/docs/GetTokenApi.md @@ -1,6 +1,6 @@ # workplace_console_client.GetTokenApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -23,10 +23,10 @@ from workplace_console_client.models.token_obtain_pair import TokenObtainPair from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/ImportApi.md b/docs/ImportApi.md index 0c9e0fb..7f168dc 100644 --- a/docs/ImportApi.md +++ b/docs/ImportApi.md @@ -1,6 +1,6 @@ # workplace_console_client.ImportApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.import_create_request import ImportCreateRe from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/RefreshTokenApi.md b/docs/RefreshTokenApi.md index fe5737c..f1c131c 100644 --- a/docs/RefreshTokenApi.md +++ b/docs/RefreshTokenApi.md @@ -1,6 +1,6 @@ # workplace_console_client.RefreshTokenApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -23,10 +23,10 @@ from workplace_console_client.models.token_refresh import TokenRefresh from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/ResetPasswordApi.md b/docs/ResetPasswordApi.md index 998d33e..3a279c1 100644 --- a/docs/ResetPasswordApi.md +++ b/docs/ResetPasswordApi.md @@ -1,6 +1,6 @@ # workplace_console_client.ResetPasswordApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.password_reset import PasswordReset from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/SubscriptionInfoApi.md b/docs/SubscriptionInfoApi.md index 8f19d96..fa09ec9 100644 --- a/docs/SubscriptionInfoApi.md +++ b/docs/SubscriptionInfoApi.md @@ -1,6 +1,6 @@ # workplace_console_client.SubscriptionInfoApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.subscription_info_create200_response import from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/SubscriptionsApi.md b/docs/SubscriptionsApi.md index d4eecec..83869fc 100644 --- a/docs/SubscriptionsApi.md +++ b/docs/SubscriptionsApi.md @@ -1,6 +1,6 @@ # workplace_console_client.SubscriptionsApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -28,10 +28,10 @@ from workplace_console_client.models.open_exchange_create_account import OpenExc from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters @@ -102,10 +102,10 @@ import workplace_console_client from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters @@ -174,10 +174,10 @@ from workplace_console_client.models.subscriptions_read200_response import Subsc from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters @@ -254,10 +254,10 @@ from workplace_console_client.models.service_action import ServiceAction from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/docs/UpgradeApi.md b/docs/UpgradeApi.md index e8b7535..e7273ae 100644 --- a/docs/UpgradeApi.md +++ b/docs/UpgradeApi.md @@ -1,6 +1,6 @@ # workplace_console_client.UpgradeApi -All URIs are relative to *http://127.0.0.1:8000/api* +All URIs are relative to *http://127.0.0.1:8001/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ from workplace_console_client.models.sub_scription_info import SubScriptionInfo from workplace_console_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://127.0.0.1:8000/api +# Defining the host is optional and defaults to http://127.0.0.1:8001/api # See configuration.py for a list of all supported configuration parameters. configuration = workplace_console_client.Configuration( - host = "http://127.0.0.1:8000/api" + host = "http://127.0.0.1:8001/api" ) # The client must configure the authentication and authorization parameters diff --git a/setup.py b/setup.py index cd3015c..2e4630c 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "workplace-console-client" -VERSION = "2.0.0" +VERSION = "1.0.0" PYTHON_REQUIRES = ">= 3.9" REQUIRES = [ "urllib3 >= 2.1.0, < 3.0.0", diff --git a/workplace_console_client/configuration.py b/workplace_console_client/configuration.py index f36409e..dc0824f 100644 --- a/workplace_console_client/configuration.py +++ b/workplace_console_client/configuration.py @@ -207,7 +207,7 @@ def __init__( ) -> None: """Constructor """ - self._base_path = "http://127.0.0.1:8000/api" if host is None else host + self._base_path = "http://127.0.0.1:8001/api" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -537,7 +537,7 @@ def get_host_settings(self) -> List[HostSetting]: """ return [ { - 'url': "http://127.0.0.1:8000/api", + 'url': "http://127.0.0.1:8001/api", 'description': "No description provided", } ] From af2bcf61ed781eed9b1c391522e3ddb6aae4ea49 Mon Sep 17 00:00:00 2001 From: Patience Igiraneza Date: Thu, 5 Jun 2025 14:44:21 +0200 Subject: [PATCH 2/2] Update setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 2e4630c..b5d1681 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "workplace-console-client" -VERSION = "1.0.0" +VERSION = "2.0.0" PYTHON_REQUIRES = ">= 3.9" REQUIRES = [ "urllib3 >= 2.1.0, < 3.0.0", @@ -48,4 +48,4 @@ Test description """, # noqa: E501 package_data={"workplace_console_client": ["py.typed"]}, -) \ No newline at end of file +)