1
- from videodb ._constants import ApiPath
1
+ from videodb ._constants import ApiPath , MeetingStatus
2
2
3
3
from videodb .exceptions import (
4
4
VideodbError ,
5
5
)
6
6
7
7
8
8
class Meeting :
9
- """Meeting class representing a meeting recording bot."""
9
+ """Meeting class representing a meeting recording bot.
10
+
11
+ :ivar str id: Unique identifier for the meeting
12
+ :ivar str collection_id: ID of the collection this meeting belongs to
13
+ :ivar str bot_name: Name of the meeting recording bot
14
+ :ivar str name: Name of the meeting
15
+ :ivar str meeting_url: URL of the meeting
16
+ :ivar str status: Current status of the meeting
17
+ :ivar str time_zone: Time zone of the meeting
18
+ :ivar str video_id: ID of the recorded video
19
+ :ivar dict speaker_timeline: Timeline of speakers in the meeting
20
+ """
10
21
11
22
def __init__ (self , _connection , id : str , collection_id : str , ** kwargs ) -> None :
12
23
self ._connection = _connection
@@ -18,7 +29,12 @@ def __repr__(self) -> str:
18
29
return f"Meeting(id={ self .id } , collection_id={ self .collection_id } , name={ self .name } , status={ self .status } , bot_name={ self .bot_name } )"
19
30
20
31
def _update_attributes (self , data : dict ) -> None :
21
- """Update instance attributes from API response data."""
32
+ """Update instance attributes from API response data.
33
+
34
+ :param dict data: Dictionary containing attribute data from API response
35
+ :return: None
36
+ :rtype: None
37
+ """
22
38
self .bot_name = data .get ("bot_name" )
23
39
self .name = data .get ("meeting_name" )
24
40
self .meeting_url = data .get ("meeting_url" )
@@ -30,11 +46,9 @@ def _update_attributes(self, data: dict) -> None:
30
46
def refresh (self ) -> "Meeting" :
31
47
"""Refresh meeting data from the server.
32
48
33
- Returns:
34
- self: The Meeting instance with updated data
35
-
36
- Raises:
37
- APIError: If the API request fails
49
+ :return: The Meeting instance with updated data
50
+ :rtype: Meeting
51
+ :raises VideodbError: If the API request fails
38
52
"""
39
53
response = self ._connection .get (
40
54
path = f"{ ApiPath .collection } /{ self .collection_id } /{ ApiPath .meeting } /{ self .id } "
@@ -49,26 +63,32 @@ def refresh(self) -> "Meeting":
49
63
50
64
@property
51
65
def is_active (self ) -> bool :
52
- """Check if the meeting is currently active."""
53
- return self .status in ["initializing" , "processing" ]
66
+ """Check if the meeting is currently active.
67
+
68
+ :return: True if meeting is initializing or processing, False otherwise
69
+ :rtype: bool
70
+ """
71
+ return self .status in [MeetingStatus .initializing , MeetingStatus .processing ]
54
72
55
73
@property
56
74
def is_completed (self ) -> bool :
57
- """Check if the meeting has completed."""
58
- return self .status in ["done" ]
75
+ """Check if the meeting has completed.
76
+
77
+ :return: True if meeting is done, False otherwise
78
+ :rtype: bool
79
+ """
80
+ return self .status == MeetingStatus .done
59
81
60
82
def wait_for_status (
61
83
self , target_status : str , timeout : int = 14400 , interval : int = 120
62
84
) -> bool :
63
85
"""Wait for the meeting to reach a specific status.
64
86
65
- Args:
66
- target_status: The status to wait for
67
- timeout: Maximum time to wait in seconds
68
- interval: Time between status checks in seconds
69
-
70
- Returns:
71
- bool: True if status reached, False if timeout
87
+ :param str target_status: The status to wait for
88
+ :param int timeout: Maximum time to wait in seconds (default: 14400)
89
+ :param int interval: Time between status checks in seconds (default: 120)
90
+ :return: True if status reached, False if timeout
91
+ :rtype: bool
72
92
"""
73
93
import time
74
94
0 commit comments