@@ -102,14 +102,15 @@ def list(self, max=None, **query_params):
102102
103103 By default, lists rooms to which the authenticated user belongs.
104104
105- This method supports Cisco Spark's implmentation of RFC5988 Web Linking
106- to provide pagination support. It returns a generator container that
107- incrementally yield all rooms returned by the query. The generator
108- will automatically request additional 'pages' of responses from Spark
109- as needed until all responses have been returned. The container makes
110- the generator safe for reuse. A new API call will be made, using the
111- same parameters that were specified when the generator was created,
112- every time a new iterator is requested from the container.
105+ This method supports Cisco Spark's implementation of RFC5988 Web
106+ Linking to provide pagination support. It returns a generator
107+ container that incrementally yield all rooms returned by the
108+ query. The generator will automatically request additional 'pages' of
109+ responses from Spark as needed until all responses have been returned.
110+ The container makes the generator safe for reuse. A new API call will
111+ be made, using the same parameters that were specified when the
112+ generator was created, every time a new iterator is requested from the
113+ container.
113114
114115 Args:
115116 max(int): Limits the maximum number of rooms returned from the
@@ -132,11 +133,13 @@ def list(self, max=None, **query_params):
132133 # Process args
133134 assert max is None or isinstance (max , int )
134135 params = {}
135- if max : params [u'max' ] = max
136+ if max :
137+ params [u'max' ] = max
136138 # Process query_param keyword arguments
137139 if query_params :
138140 for param , value in query_params .items ():
139- if isinstance (value , basestring ): value = utf8 (value )
141+ if isinstance (value , basestring ):
142+ value = utf8 (value )
140143 params [utf8 (param )] = value
141144 # API request - get items
142145 items = self .session .get_items ('rooms' , params = params )
@@ -164,10 +167,11 @@ def create(self, title, teamId=None):
164167 assert teamId is None or isinstance (teamId , basestring )
165168 post_data = {}
166169 post_data [u'title' ] = utf8 (title )
167- if teamId : post_data [u'teamId' ] = utf8 (teamId )
170+ if teamId :
171+ post_data [u'teamId' ] = utf8 (teamId )
168172 # API request
169173 json_obj = self .session .post ('rooms' , json = post_data )
170- # Return a Person object created from the response JSON data
174+ # Return a Room object created from the response JSON data
171175 return Room (json_obj )
172176
173177 def get (self , roomId ):
@@ -185,7 +189,7 @@ def get(self, roomId):
185189 assert isinstance (roomId , basestring )
186190 # API request
187191 json_obj = self .session .get ('rooms/' + roomId )
188- # Return a Person object created from the response JSON data
192+ # Return a Room object created from the response JSON data
189193 return Room (json_obj )
190194
191195 def update (self , roomId , ** update_attributes ):
@@ -215,11 +219,12 @@ def update(self, roomId, **update_attributes):
215219 raise ciscosparkapiException (error_message )
216220 put_data = {}
217221 for param , value in update_attributes .items ():
218- if isinstance (value , basestring ): value = utf8 (value )
222+ if isinstance (value , basestring ):
223+ value = utf8 (value )
219224 put_data [utf8 (param )] = value
220225 # API request
221226 json_obj = self .session .post ('rooms' , json = put_data )
222- # Return a Person object created from the response JSON data
227+ # Return a Room object created from the response JSON data
223228 return Room (json_obj )
224229
225230 def delete (self , roomId ):
0 commit comments