Skip to content

Commit 3aa42f0

Browse files
committed
Move get_url_and_header_from_metadata to private
1 parent 9a7d70b commit 3aa42f0

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

docs/sandbox.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,16 +1149,6 @@ def delete() -> None
11491149

11501150
Delete the sandbox instance.
11511151

1152-
<a id="koyeb/sandbox.sandbox.Sandbox.get_url_and_header_from_metadata"></a>
1153-
1154-
#### get\_url\_and\_header\_from\_metadata
1155-
1156-
```python
1157-
def get_url_and_header_from_metadata() -> Optional[Tuple[str, str]]
1158-
```
1159-
1160-
Get the public url of the sandbox and the routing key to use to reach it.
1161-
11621152
<a id="koyeb/sandbox.sandbox.Sandbox.get_domain"></a>
11631153

11641154
#### get\_domain

koyeb/sandbox/sandbox.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def delete(self) -> None:
468468
apps_api, _, _, _, _ = get_api_client(self.api_token)
469469
apps_api.delete_app(self.app_id)
470470

471-
def get_url_and_header_from_metadata(self) -> Optional[Tuple[str, str]]:
471+
def _get_url_and_header_from_metadata(self) -> Optional[Tuple[str, str]]:
472472
"""
473473
Get the public url of the sandbox and the routing key to use to reach it.
474474
"""
@@ -528,7 +528,7 @@ def _get_url(self) -> Optional[str]:
528528
Optional[str]: The full URL or None if unavailable
529529
"""
530530
if self._url is None:
531-
url_data = self.get_url_and_header_from_metadata()
531+
url_data = self._get_url_and_header_from_metadata()
532532
if url_data:
533533
self._url = f"{url_data[0]}/r/{url_data[1]}/"
534534
return self._url
@@ -613,7 +613,7 @@ def _get_sandbox_url(self) -> Optional[Tuple[str, Optional[str]]]:
613613
Optional[str]: the routing key to use to reach the sandbox, if needed
614614
"""
615615
if self._sandbox_url is None:
616-
url_data = self.get_url_and_header_from_metadata()
616+
url_data = self._get_url_and_header_from_metadata()
617617
if url_data:
618618
self._sandbox_url = (f"{url_data[0]}/koyeb-sandbox", url_data[1])
619619
return self._sandbox_url

0 commit comments

Comments
 (0)