(self)
| 7 | self._check_connection() |
| 8 | |
| 9 | def _check_connection(self): |
| 10 | try: |
| 11 | # Try to connect to the desktop app |
| 12 | response = self.session.get(f"{self.base_url}/health") |
| 13 | response.raise_for_status() |
| 14 | except requests.exceptions.RequestException as e: |
| 15 | raise ConnectionError("Couldn't connect to the Surfer Desktop app. Is it running?") from e |
| 16 | |
| 17 | |
| 18 | def get(self, platform_id: str) -> dict: |