1- from videodb ._constants import ApiPath
1+ from videodb ._constants import ApiPath , MeetingStatus
22
33from videodb .exceptions import (
44 VideodbError ,
55)
66
77
88class 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+ """
1021
1122 def __init__ (self , _connection , id : str , collection_id : str , ** kwargs ) -> None :
1223 self ._connection = _connection
@@ -18,7 +29,12 @@ def __repr__(self) -> str:
1829 return f"Meeting(id={ self .id } , collection_id={ self .collection_id } , name={ self .name } , status={ self .status } , bot_name={ self .bot_name } )"
1930
2031 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+ """
2238 self .bot_name = data .get ("bot_name" )
2339 self .name = data .get ("meeting_name" )
2440 self .meeting_url = data .get ("meeting_url" )
@@ -30,11 +46,9 @@ def _update_attributes(self, data: dict) -> None:
3046 def refresh (self ) -> "Meeting" :
3147 """Refresh meeting data from the server.
3248
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
3852 """
3953 response = self ._connection .get (
4054 path = f"{ ApiPath .collection } /{ self .collection_id } /{ ApiPath .meeting } /{ self .id } "
@@ -49,26 +63,32 @@ def refresh(self) -> "Meeting":
4963
5064 @property
5165 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 ]
5472
5573 @property
5674 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
5981
6082 def wait_for_status (
6183 self , target_status : str , timeout : int = 14400 , interval : int = 120
6284 ) -> bool :
6385 """Wait for the meeting to reach a specific status.
6486
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
7292 """
7393 import time
7494
0 commit comments