Skip to content

Commit d02f71e

Browse files
authored
Removing restriction of mandatory fields in list()
Cisco Spark APIs has now made "displayName" and "email" as optional fields to list the people in an organization. Changing the code in such a way that "displayName" and "email" specification are optional.
1 parent 077ec28 commit d02f71e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

ciscosparkapi/api/people.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ def __init__(self, session):
131131

132132
@generator_container
133133
def list(self, email=None, displayName=None, max=None):
134-
"""List people by email or displayName.
135-
136-
An email address or displayName must be provided.
134+
"""List people
137135
138136
This method supports Cisco Spark's implementation of RFC5988 Web
139137
Linking to provide pagination support. It returns a generator
@@ -158,8 +156,6 @@ def list(self, email=None, displayName=None, max=None):
158156
159157
Raises:
160158
AssertionError: If the parameter types are incorrect.
161-
ciscosparkapiException: If neither an email or displayName argument
162-
is specified.
163159
SparkApiError: If the Cisco Spark cloud returns an error.
164160
165161
"""
@@ -172,10 +168,6 @@ def list(self, email=None, displayName=None, max=None):
172168
params['email'] = email
173169
elif displayName:
174170
params['displayName'] = displayName
175-
else:
176-
error_message = "An email or displayName argument must be " \
177-
"specified."
178-
raise ciscosparkapiException(error_message)
179171
if max:
180172
params['max'] = max
181173
# API request - get items

0 commit comments

Comments
 (0)