Get users for service to show on the manage team page.

Calls api endpoint /service/<service_id>/users to retrieve all users associated with the service
This commit is contained in:
Rebecca Law
2016-02-23 17:51:09 +00:00
parent bcf21f5ab2
commit 2905d11fe4
5 changed files with 31 additions and 6 deletions

View File

@@ -81,6 +81,11 @@ class UserApiClient(BaseAPIClient):
return False, 'Code not found'
raise e
def get_users_for_service(self, service_id):
endpoint = '/service/{}/users'.format(service_id)
resp = self.get(endpoint)
return resp['data']
class User(UserMixin):
def __init__(self, fields, max_failed_login_count=3):