Skip to content

Commit e851508

Browse files
authored
Add additional properties to Room and fix missing arguments in rooms API (#246)
This pull request includes two commits; these changes enhance the functionality and completeness of the Room class and ensure that the rooms API works correctly. The first commit adds additional properties to the Room class, including `classificationId`, `isAnnouncementOnly`, `isReadOnly`, `isPublic`, `madePublic`, and `description`. The second commit fixes missing arguments in the rooms API by adding the create room args to the `post_data`. Fixes #244
2 parents 39901e5 + 1e13d2e commit e851508

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

src/webexpythonsdk/api/rooms.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ def create(
176176
request_parameters,
177177
title=title,
178178
teamId=teamId,
179+
classificationId=classificationId,
180+
isLocked=isLocked,
181+
isPublic=isPublic,
182+
description=description,
183+
isAnnouncementOnly=isAnnouncementOnly,
179184
)
180185

181186
# API request

src/webexpythonsdk/models/mixins/room.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,45 @@ def created(self):
8585
def ownerId(self):
8686
"""The ID of the organization which owns this room."""
8787
return self._json_data.get("ownerId")
88+
89+
@property
90+
def classificationId(self):
91+
"""The ID of the current classification."""
92+
return self._json_data.get("ownerId")
93+
94+
@property
95+
def isAnnouncementOnly(self):
96+
"""Indicates when a space is in Announcement Mode (only moderators can post)."""
97+
return self._json_data.get("ownerId")
98+
99+
@property
100+
def isReadOnly(self):
101+
"""Room is read-only.
102+
103+
A compliance officer can set a direct room as read-only, which will disallow any
104+
new information exchanges in this space, while maintaining historical data.
105+
"""
106+
return self._json_data.get("ownerId")
107+
108+
@property
109+
def isPublic(self):
110+
"""Room is public.
111+
112+
The room is public and therefore discoverable within the org. Anyone can find
113+
and join the room.
114+
"""
115+
return self._json_data.get("ownerId")
116+
117+
@property
118+
def madePublic(self):
119+
"""Date and time when the room was made public."""
120+
made_public = self._json_data.get("created")
121+
if made_public:
122+
return WebexDateTime.strptime(made_public)
123+
else:
124+
return None
125+
126+
@property
127+
def description(self):
128+
"""The description of the room."""
129+
return self._json_data.get("ownerId")

0 commit comments

Comments
 (0)