Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Credit System-less servers authenticate with a token #476

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions geti_sdk/rest_clients/credit_system_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ def is_supported(self) -> bool:

:return: True if the Credit System is supported, False otherwise.
"""
# Send a GET request to the balance endpoint to check if the Credit System is supported.
# The text response is allowed to check if the server responds with a default
# html page in case the Credit System is not supported.
r = self.session.get_rest_response(
url=self.session.base_url + "balance",
method="GET",
allow_text_response=True,
)
if isinstance(r, dict):
# If the Platform responds with the information about the available subscriptions,
Expand Down
Loading