hassio/api/__init__.py
def _register_proxy(self) -> None:
        """Register Home Assistant API Proxy."""
        api_proxy = APIProxy()
        api_proxy.coresys = self.coresys

        self.webapp.add_routes(
            [
                web.get("/homeassistant/api/websocket", api_proxy.websocket),
                web.get("/homeassistant/websocket", api_proxy.websocket),
                web.get("/homeassistant/api/stream", api_proxy.stream),
                web.post("/homeassistant/api/{path:.+}", api_proxy.api),
                web.get("/homeassistant/api/{path:.+}", api_proxy.api),
                web.get("/homeassistant/api/", api_proxy.api),
            ]
        )
Register Home Assistant API Proxy.
Register Home Assistant API Proxy.
Register Home Assistant API Proxy .
def _register_proxy(self) -> None:
        api_proxy = APIProxy()
        api_proxy.coresys = self.coresys
        self.webapp.add_routes(
            [
                web.get("/homeassistant/api/websocket", api_proxy.websocket),
                web.get("/homeassistant/websocket", api_proxy.websocket),
                web.get("/homeassistant/api/stream", api_proxy.stream),
                web.post("/homeassistant/api/{path:.+}", api_proxy.api),
                web.get("/homeassistant/api/{path:.+}", api_proxy.api),
                web.get("/homeassistant/api/", api_proxy.api),
            ]
        )
def _register_proxy ( self ) -> None : api_proxy = APIProxy ( ) api_proxy . coresys = self . coresys self . webapp . add_routes ( [ web . get ( "/homeassistant/api/websocket" , api_proxy . websocket ) , web . get ( "/homeassistant/websocket" , api_proxy . websocket ) , web . get ( "/homeassistant/api/stream" , api_proxy . stream ) , web . post ( "/homeassistant/api/{path:.+}" , api_proxy . api ) , web . get ( "/homeassistant/api/{path:.+}" , api_proxy . api ) , web . get ( "/homeassistant/api/" , api_proxy . api ) , ] )
Register Home Assistant API Proxy.
Register Home Assistant API Proxy .
"""Register Home Assistant API Proxy."""
self