api: implement ccu querying
This commit is contained in:
parent
745dfaf19f
commit
c1a78e4dc9
6 changed files with 628 additions and 22 deletions
|
|
@ -7,6 +7,7 @@ from simple_openid_connect.client import OpenidClient
|
|||
from cachetools import Cache
|
||||
|
||||
from dooris_api import models, exceptions
|
||||
from dooris_api.ccujack import CCUJackClient
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
@ -77,3 +78,10 @@ def get_cache(req: Request) -> Cache:
|
|||
|
||||
Cache = Annotated[Cache, Depends(get_cache)]
|
||||
|
||||
|
||||
def get_ccujack(req: Request) -> CCUJackClient:
|
||||
return req.app.extra["ccujack"]
|
||||
|
||||
|
||||
CCUJackClient = Annotated[CCUJackClient, Depends(get_ccujack)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue