Skip to content

Commit 44745c9

Browse files
committed
Add CiscoSparkAPI.people.delete() method / API call
I don’t know how I missed this one…
1 parent d0eee37 commit 44745c9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ciscosparkapi/api/people.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,24 @@ def get(self, personId):
302302
# Return a Person object created from the response JSON data
303303
return Person(json_obj)
304304

305+
def delete(self, personId):
306+
"""Remove a person from the system.
307+
308+
Only an admin can remove a person.
309+
310+
Args:
311+
personId(string_types): The personID of the person.
312+
313+
Raises:
314+
AssertionError: If the parameter types are incorrect.
315+
SparkApiError: If the Cisco Spark cloud returns an error.
316+
317+
"""
318+
# Process args
319+
assert isinstance(personId, string_types)
320+
# API request
321+
self._session.delete('people/' + personId)
322+
305323
def me(self):
306324
"""Get the person details of the account accessing the API 'me'.
307325

0 commit comments

Comments
 (0)