Skip to content

Commit 2489509

Browse files
committed
Update Rooms API
- Set default value for `max=` parameter on the rooms.list() method. - Make `title` a required parameter for the rooms.update() method.
1 parent 442751e commit 2489509

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

webexteamssdk/api/rooms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(self, session, object_factory):
7373
self._object_factory = object_factory
7474

7575
@generator_container
76-
def list(self, teamId=None, type=None, sortBy=None, max=None,
76+
def list(self, teamId=None, type=None, sortBy=None, max=100,
7777
**request_parameters):
7878
"""List rooms.
7979
@@ -189,7 +189,7 @@ def get(self, roomId):
189189
# Return a room object created from the response JSON data
190190
return self._object_factory(OBJECT_TYPE, json_data)
191191

192-
def update(self, roomId, title=None, **request_parameters):
192+
def update(self, roomId, title, **request_parameters):
193193
"""Update details for a room, by ID.
194194
195195
Args:
@@ -207,7 +207,7 @@ def update(self, roomId, title=None, **request_parameters):
207207
208208
"""
209209
check_type(roomId, basestring)
210-
check_type(roomId, basestring, optional=True)
210+
check_type(roomId, basestring)
211211

212212
put_data = dict_from_items_with_values(
213213
request_parameters,

webexteamssdk/models/mixins/room.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ class RoomBasicPropertiesMixin(object):
4141
@property
4242
def id(self):
4343
"""A unique identifier for the room."""
44-
return self._json_data.get('id')
44+
return self._json_data.get("id")
4545

4646
@property
4747
def title(self):
4848
"""A user-friendly name for the room."""
49-
return self._json_data.get('title')
49+
return self._json_data.get("title")
5050

5151
@property
5252
def type(self):
@@ -57,22 +57,22 @@ def type(self):
5757
5858
`group`: Group room
5959
"""
60-
return self._json_data.get('type')
60+
return self._json_data.get("type")
6161

6262
@property
6363
def isLocked(self):
6464
"""Whether the room is moderated (locked) or not."""
65-
return self._json_data.get('isLocked')
65+
return self._json_data.get("isLocked")
6666

6767
@property
6868
def teamId(self):
6969
"""The ID for the team with which this room is associated."""
70-
return self._json_data.get('teamId')
70+
return self._json_data.get("teamId")
7171

7272
@property
7373
def lastActivity(self):
74-
"""The date and time of the room's last activity."""
75-
last_activity = self._json_data.get('lastActivity')
74+
"""The date and time of the room"s last activity."""
75+
last_activity = self._json_data.get("lastActivity")
7676
if last_activity:
7777
return WebexTeamsDateTime.strptime(last_activity)
7878
else:
@@ -81,18 +81,18 @@ def lastActivity(self):
8181
@property
8282
def creatorId(self):
8383
"""The ID of the person who created this room."""
84-
return self._json_data.get('creatorId')
85-
86-
@property
87-
def ownerId(self):
88-
"""The ID of the organization which owns this room."""
89-
return self._json_data.get('ownerId')
84+
return self._json_data.get("creatorId")
9085

9186
@property
9287
def created(self):
9388
"""The date and time the room was created."""
94-
created = self._json_data.get('created')
89+
created = self._json_data.get("created")
9590
if created:
9691
return WebexTeamsDateTime.strptime(created)
9792
else:
9893
return None
94+
95+
@property
96+
def ownerId(self):
97+
"""The ID of the organization which owns this room."""
98+
return self._json_data.get("ownerId")

0 commit comments

Comments
 (0)