Skip to content

Commit e986674

Browse files
committed
Update orgs.py
1 parent 508c913 commit e986674

1 file changed

Lines changed: 7 additions & 49 deletions

File tree

src/mistapi/websockets/orgs.py

Lines changed: 7 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"""
1313

1414
from mistapi import APISession
15-
from mistapi.websockets.__ws_client import _MistWebsocket
15+
from mistapi.websockets.__ws_client import _COMMON_WS_PARAMS_DOC, _MistWebsocket
1616

1717

1818
class InsightsEvents(_MistWebsocket):
19-
"""WebSocket stream for organization insights events.
19+
f"""WebSocket stream for organization insights events.
2020
2121
Subscribes to the ``orgs/{org_id}/insights/summary`` channel and delivers
2222
real-time insights events for the given organization.
@@ -27,21 +27,7 @@ class InsightsEvents(_MistWebsocket):
2727
Authenticated API session.
2828
org_id : str
2929
UUID of the organization to stream events from.
30-
ping_interval : int, default 30
31-
Interval in seconds to send WebSocket ping frames (keep-alive).
32-
ping_timeout : int, default 10
33-
Time in seconds to wait for a ping response before considering the connection dead.
34-
auto_reconnect : bool, default False
35-
Automatically reconnect on unexpected disconnections using exponential backoff.
36-
max_reconnect_attempts : int, default 5
37-
Maximum number of reconnect attempts before giving up.
38-
reconnect_backoff : float, default 2.0
39-
Base backoff delay in seconds. Doubles after each failed attempt.
40-
queue_maxsize : int, default 0
41-
Maximum number of messages buffered in the internal queue for the
42-
``receive()`` generator. ``0`` means unbounded. When set, the
43-
incoming messages are dropped with a warning when the queue is
44-
full, preventing memory growth on high-frequency streams.
30+
{_COMMON_WS_PARAMS_DOC}
4531
4632
EXAMPLE
4733
-----------
@@ -92,7 +78,7 @@ def __init__(
9278

9379

9480
class MxEdgesStatsEvents(_MistWebsocket):
95-
"""WebSocket stream for organization MX edges stats events.
81+
f"""WebSocket stream for organization MX edges stats events.
9682
9783
Subscribes to the ``orgs/{org_id}/stats/mxedges`` channel and delivers
9884
real-time MX edges stats events for the given organization.
@@ -103,21 +89,7 @@ class MxEdgesStatsEvents(_MistWebsocket):
10389
Authenticated API session.
10490
org_id : str
10591
UUID of the organization to stream events from.
106-
ping_interval : int, default 30
107-
Interval in seconds to send WebSocket ping frames (keep-alive).
108-
ping_timeout : int, default 10
109-
Time in seconds to wait for a ping response before considering the connection dead.
110-
auto_reconnect : bool, default False
111-
Automatically reconnect on unexpected disconnections using exponential backoff.
112-
max_reconnect_attempts : int, default 5
113-
Maximum number of reconnect attempts before giving up.
114-
reconnect_backoff : float, default 2.0
115-
Base backoff delay in seconds. Doubles after each failed attempt.
116-
queue_maxsize : int, default 0
117-
Maximum number of messages buffered in the internal queue for the
118-
``receive()`` generator. ``0`` means unbounded. When set, the
119-
incoming messages are dropped with a warning when the queue is
120-
full, preventing memory growth on high-frequency streams.
92+
{_COMMON_WS_PARAMS_DOC}
12193
12294
EXAMPLE
12395
-----------
@@ -168,7 +140,7 @@ def __init__(
168140

169141

170142
class MxEdgesEvents(_MistWebsocket):
171-
"""WebSocket stream for org MX edges events.
143+
f"""WebSocket stream for org MX edges events.
172144
173145
Subscribes to the ``orgs/{org_id}/mxedges`` channel and delivers
174146
real-time MX edges events for the given org.
@@ -179,21 +151,7 @@ class MxEdgesEvents(_MistWebsocket):
179151
Authenticated API session.
180152
org_id : str
181153
UUID of the org to stream events from.
182-
ping_interval : int, default 30
183-
Interval in seconds to send WebSocket ping frames (keep-alive).
184-
ping_timeout : int, default 10
185-
Time in seconds to wait for a ping response before considering the connection dead.
186-
auto_reconnect : bool, default False
187-
Automatically reconnect on unexpected disconnections using exponential backoff.
188-
max_reconnect_attempts : int, default 5
189-
Maximum number of reconnect attempts before giving up.
190-
reconnect_backoff : float, default 2.0
191-
Base backoff delay in seconds. Doubles after each failed attempt.
192-
queue_maxsize : int, default 0
193-
Maximum number of messages buffered in the internal queue for the
194-
``receive()`` generator. ``0`` means unbounded. When set, the
195-
incoming messages are dropped with a warning when the queue is
196-
full, preventing memory growth on high-frequency streams.
154+
{_COMMON_WS_PARAMS_DOC}
197155
198156
EXAMPLE
199157
-----------

0 commit comments

Comments
 (0)