@@ -137,7 +137,7 @@ def __init__(self, session):
137
137
self ._session = session
138
138
139
139
@generator_container
140
- def list (self , email = None , displayName = None , orgId = None , max = None ):
140
+ def list (self , email = None , displayName = None , orgId = None , id = None , max = None ):
141
141
"""List people
142
142
143
143
This method supports Cisco Spark's implementation of RFC5988 Web
@@ -154,6 +154,7 @@ def list(self, email=None, displayName=None, orgId=None, max=None):
154
154
email(basestring): The e-mail address of the person to be found.
155
155
displayName(basestring): The complete or beginning portion of
156
156
the displayName to be searched.
157
+ id(basestring): List people by ID. Accepts up to 85 person IDs separated by commas.
157
158
orgId(basestring): The organization id.
158
159
max(int): Limits the maximum number of people returned from the
159
160
Spark service per request.
@@ -171,16 +172,20 @@ def list(self, email=None, displayName=None, orgId=None, max=None):
171
172
assert email is None or isinstance (email , basestring )
172
173
assert displayName is None or isinstance (displayName , basestring )
173
174
assert orgId is None or isinstance (orgId , basestring )
175
+ assert id is None or isinstance (id , basestring )
174
176
assert max is None or isinstance (max , int )
175
177
params = {}
176
- if email :
177
- params ['email' ] = email
178
- elif displayName :
179
- params ['displayName' ] = displayName
180
- if orgId :
181
- params ["orgId" ] = orgId
182
- if max :
183
- params ['max' ] = max
178
+ if id :
179
+ params ["id" ] = id
180
+ else :
181
+ if email :
182
+ params ['email' ] = email
183
+ elif displayName :
184
+ params ['displayName' ] = displayName
185
+ if orgId :
186
+ params ["orgId" ] = orgId
187
+ if max :
188
+ params ['max' ] = max
184
189
# API request - get items
185
190
items = self ._session .get_items ('people' , params = params )
186
191
# Yield Person objects created from the returned items JSON objects
0 commit comments