Skip to content

Commit 5b017ff

Browse files
committed
Update docstrings
1 parent 080fa43 commit 5b017ff

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

ciscosparkapi/api/memberships.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ def create(self, roomId, personId=None, personEmail=None,
175175
isModerator(bool): If True, adds the person as a moderator for the
176176
room. If False, adds the person as normal member of the room.
177177
178+
Returns:
179+
Membership: With the details of the created membership.
180+
178181
Raises:
179182
AssertionError: If the parameter types are incorrect.
180183
ciscosparkapiException: If neither a personId or personEmail are
@@ -209,6 +212,9 @@ def get(self, membershipId):
209212
Args:
210213
membershipId(unicode, str): The membershipId of the membership.
211214
215+
Returns:
216+
Membership: With the details of the requested membership.
217+
212218
Raises:
213219
AssertionError: If the parameter types are incorrect.
214220
SparkApiError: If the Cisco Spark cloud returns an error.
@@ -233,7 +239,7 @@ def update(self, membershipId, **update_attributes):
233239
room. If False, removes the person as a moderator for the room.
234240
235241
Returns:
236-
A Person object with the updated Spark membership details.
242+
Membership: With the updated Spark membership details.
237243
238244
Raises:
239245
AssertionError: If the parameter types are incorrect.

ciscosparkapi/api/people.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ def get(self, personId):
145145
Args:
146146
personId(unicode, str): The personID of the person.
147147
148+
Returns:
149+
Person: With the details of the requested person.
150+
148151
Raises:
149152
AssertionError: If the parameter types are incorrect.
150153
SparkApiError: If the Cisco Spark cloud returns an error.

ciscosparkapi/api/rooms.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Room(SparkData):
1818
"""Model a Spark 'room' JSON object as a native Python object."""
1919

2020
def __init__(self, json):
21-
"""Init a new Person data object from a JSON dictionary or string.
21+
"""Init a new Room data object from a JSON dictionary or string.
2222
2323
Args:
2424
json(dict, unicode, str): Input JSON object.
@@ -123,7 +123,7 @@ def list(self, max=None, **query_params):
123123
'group': returns all group rooms.
124124
125125
Yields:
126-
Person: The the next room from the Cisco Spark query.
126+
Room: The the next room from the Cisco Spark query.
127127
128128
Raises:
129129
AssertionError: If the parameter types are incorrect.
@@ -143,7 +143,7 @@ def list(self, max=None, **query_params):
143143
params[utf8(param)] = value
144144
# API request - get items
145145
items = self.session.get_items('rooms', params=params)
146-
# Yield Person objects created from the returned items JSON objects
146+
# Yield Room objects created from the returned items JSON objects
147147
for item in items:
148148
yield Room(item)
149149

@@ -157,6 +157,9 @@ def create(self, title, teamId=None):
157157
teamId(unicode, str): The team ID with which this room is
158158
associated.
159159
160+
Returns:
161+
Room: With the details of the created room.
162+
160163
Raises:
161164
AssertionError: If the parameter types are incorrect.
162165
SparkApiError: If the Cisco Spark cloud returns an error.
@@ -180,6 +183,9 @@ def get(self, roomId):
180183
Args:
181184
roomId(unicode, str): The roomId of the room.
182185
186+
Returns:
187+
Room: With the details of the requested room.
188+
183189
Raises:
184190
AssertionError: If the parameter types are incorrect.
185191
SparkApiError: If the Cisco Spark cloud returns an error.
@@ -202,7 +208,7 @@ def update(self, roomId, **update_attributes):
202208
title(unicode, str): A user-friendly name for the room.
203209
204210
Returns:
205-
A Person object with the updated Spark room details.
211+
Room: With the updated Spark room details.
206212
207213
Raises:
208214
AssertionError: If the parameter types are incorrect.

0 commit comments

Comments
 (0)