File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 - uses : actions/setup-python@v4
1515 with :
1616 python-version : ' 3.8'
17- - run : pip install -r dev-requirements.txt
17+ - uses : abatilo/actions-poetry@v2
18+ - run : poetry install
1819 - run : ./pdoc.sh
1920 - uses : actions/upload-pages-artifact@v2
2021 with :
Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ class Notifier:
2222 '''
2323
2424 def __init__ (self ,
25- server_address : str = 'localhost:5002' , server_api_token : str = 'development' ):
26- self ._server_address = server_address
25+ server_address : str = 'localhost:5002' ,
26+ server_api_token : str = 'development' ,
27+ secure : bool = False ):
28+ '''
29+ Create Notifier instance, providing the jellyfish address and api token.
30+ Set secure to `True` for `wss` and `False` for `ws` connection (default).
31+ '''
32+
33+ protocol = 'wss' if secure else 'ws'
34+ self ._server_address = f'{ protocol } ://{ server_address } /socket/server/websocket'
2735 self ._server_api_token = server_api_token
2836 self ._websocket = None
2937 self ._ready = False
@@ -61,8 +69,7 @@ async def connect(self):
6169 The handlers have to be defined before calling `connect`,
6270 otherwise the messages won't be received.
6371 '''
64- address = f'ws://{ self ._server_address } /socket/server/websocket'
65- async with client .connect (address ) as websocket :
72+ async with client .connect (self ._server_address ) as websocket :
6673 try :
6774 self ._websocket = websocket
6875 await self ._authenticate ()
Original file line number Diff line number Diff line change @@ -15,12 +15,17 @@ class RoomApi:
1515 '''Allows for managing rooms'''
1616
1717 def __init__ (self ,
18- server_address : str = 'localhost:5002' , server_api_token : str = 'development' ):
18+ server_address : str = 'localhost:5002' ,
19+ server_api_token : str = 'development' ,
20+ secure : bool = False ):
1921 '''
2022 Create RoomApi instance, providing the jellyfish address and api token.
23+ Set secure to `True` for `https` and `False` for `http` connection (default).
2124 '''
25+
26+ protocol = 'https' if secure else 'http'
2227 self ._configuration = jellyfish_api .Configuration (
23- host = f'http ://{ server_address } ' ,
28+ host = f'{ protocol } ://{ server_address } ' ,
2429 access_token = server_api_token
2530 )
2631
Original file line number Diff line number Diff line change 1- pdoc\
1+ poetry run pdoc \
22 --favicon https://logo.swmansion.com/membrane/\? width\= 100\& variant\= signetDark\
33 --logo https://logo.swmansion.com/membrane/\? width\= 70\& variant\= signetDark\
44 -t doc_templates \
You can’t perform that action at this time.
0 commit comments