Skip to content
Open
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: 3 additions & 1 deletion transip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class TransIP:
TransIP API
global_key (bool): Allow the access token to be used from all
IP-addresses instead of only the whitelisted ones.
transip_domain_extension (str): supply a different transip domain to use as api endpoint, possible options: eu, be, nl (default).
"""

def __init__(
Expand All @@ -66,9 +67,10 @@ def __init__(
private_key: Optional[str] = None,
private_key_file: Optional[str] = None,
global_key: bool = False,
transip_domain_extension: str = "nl",
) -> None:
self._api_version: str = api_version
self._url: str = f"https://api.transip.nl/v{api_version}"
self._url: str = f"https://api.transip.{transip_domain_extension}/v{api_version}"

# Headers to use when making a request to TransIP
self.headers: Dict[str, str] = {
Expand Down