UltimakerCloudAuthentication.py 1.0 KB

123456789101112131415161718192021222324252627282930
  1. # Copyright (c) 2018 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. # ---------
  4. # Constants used for the Cloud API
  5. # ---------
  6. DEFAULT_CLOUD_API_ROOT = "https://api.ultimaker.com" # type: str
  7. DEFAULT_CLOUD_API_VERSION = "1" # type: str
  8. DEFAULT_CLOUD_ACCOUNT_API_ROOT = "https://account.ultimaker.com" # type: str
  9. try:
  10. from cura.CuraVersion import CuraCloudAPIRoot # type: ignore
  11. if CuraCloudAPIRoot == "":
  12. CuraCloudAPIRoot = DEFAULT_CLOUD_API_ROOT
  13. except ImportError:
  14. CuraCloudAPIRoot = DEFAULT_CLOUD_API_ROOT
  15. try:
  16. from cura.CuraVersion import CuraCloudAPIVersion # type: ignore
  17. if CuraCloudAPIVersion == "":
  18. CuraCloudAPIVersion = DEFAULT_CLOUD_API_VERSION
  19. except ImportError:
  20. CuraCloudAPIVersion = DEFAULT_CLOUD_API_VERSION
  21. try:
  22. from cura.CuraVersion import CuraCloudAccountAPIRoot # type: ignore
  23. if CuraCloudAccountAPIRoot == "":
  24. CuraCloudAccountAPIRoot = DEFAULT_CLOUD_ACCOUNT_API_ROOT
  25. except ImportError:
  26. CuraCloudAccountAPIRoot = DEFAULT_CLOUD_ACCOUNT_API_ROOT