listen ¤
Command to listen to notifications from the server.
Functions:
-
listen
–Listen subcommand.
listen ¤
listen(
api: API,
callbacks_module: str | Path | None = None,
event_types: list[str] | None = None,
timeout: int = 5,
) -> int
Listen subcommand.
Parameters:
-
api
(API
) –The API instance to use.
-
callbacks_module
(str | Path | None
, default:None
) –The path to the module to import, containing the callbacks as functions.
-
event_types
(list[str] | None
, default:None
) –The event types to process.
-
timeout
(int
, default:5
) –The timeout to pass to the WebSocket connection, in seconds.
Returns:
-
int
(int
) –Always 0.
Source code in src/aria2p/cli/commands/listen.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|