Skip to content

Add additional properties to Room and fix missing arguments in rooms API #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/webexpythonsdk/api/rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ def create(
request_parameters,
title=title,
teamId=teamId,
classificationId=classificationId,
isLocked=isLocked,
isPublic=isPublic,
description=description,
isAnnouncementOnly=isAnnouncementOnly,
)

# API request
Expand Down
42 changes: 42 additions & 0 deletions src/webexpythonsdk/models/mixins/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,45 @@ def created(self):
def ownerId(self):
"""The ID of the organization which owns this room."""
return self._json_data.get("ownerId")

@property
def classificationId(self):
"""The ID of the current classification."""
return self._json_data.get("ownerId")

@property
def isAnnouncementOnly(self):
"""Indicates when a space is in Announcement Mode (only moderators can post)."""
return self._json_data.get("ownerId")

@property
def isReadOnly(self):
"""Room is read-only.

A compliance officer can set a direct room as read-only, which will disallow any
new information exchanges in this space, while maintaining historical data.
"""
return self._json_data.get("ownerId")

@property
def isPublic(self):
"""Room is public.

The room is public and therefore discoverable within the org. Anyone can find
and join the room.
"""
return self._json_data.get("ownerId")

@property
def madePublic(self):
"""Date and time when the room was made public."""
made_public = self._json_data.get("created")
if made_public:
return WebexDateTime.strptime(made_public)
else:
return None

@property
def description(self):
"""The description of the room."""
return self._json_data.get("ownerId")