(self, key: str)
| 99 | self.log.warning(f"No data could be loaded for {self.url}") |
| 100 | |
| 101 | def __getitem__(self, key: str) -> "Endpoint": |
| 102 | if not isinstance(key, str) or not key or "/" in key: |
| 103 | raise KeyError(key) |
| 104 | |
| 105 | if key not in self._children: |
| 106 | child_url: str = f'{self.url.rstrip("/")}/{key}' |
| 107 | self._children[key] = Endpoint(child_url, self.client) |
| 108 | |
| 109 | return self._children[key] |
| 110 | |
| 111 | def list_children(self) -> List[str]: |
| 112 | return list(self._children.keys()) |